Asmusr Posted January 10, 2020 Share Posted January 10, 2020 1 hour ago, digress said: Ok so I have done that previously with the tile scroll routine so I can find that again. i compiled this using asm994a. almost worked for me. i got 1 error *** Warning #1: Missing END directive 91 005E 0000 END * WinAsm99 Supplied Directive edit: i just realized that i don't need to alter that asm994a already added the end statement for me. how do I set in memory these variables does that mean register0 of the f18a? * R0 x1 value * R1 y1 value * R2 x2 value * R3 y2 value * R13 Color (0-3) You can add a new line END at the end to avoid the warning. To initialize the registers, add something like this at the beginning of the routine right after the LINE label: MOV @>3000,R0 MOV @>3002,R1 MOV @>3004,R2 MOV @>3006,R3 That will copy the VDP memory words at hex 3000 - hex 3006 to the four registers (choose your own memory locations). You then need to set up those words before starting the GPU. You should perhaps also replace the RSTK instruction with an IDLE instruction followed by JMP LINE. Then the GPU will go idle after drawing one line, and when you enable it again it will draw another. I'm not sure how to add an IDLE instruction in WinAsm99. Quote Link to comment Share on other sites More sharing options...
fabrice montupet Posted January 10, 2020 Share Posted January 10, 2020 On 10/2/2014 at 5:14 PM, Asmusr said: Gauntlet Totally agree! I am a big fan of this game. Quote Link to comment Share on other sites More sharing options...
Stuart Posted January 10, 2020 Share Posted January 10, 2020 4 hours ago, Asmusr said: I'm not sure how to add an IDLE instruction in WinAsm99. DATA >0340 will do it. Quote Link to comment Share on other sites More sharing options...
matthew180 Posted January 10, 2020 Share Posted January 10, 2020 (edited) You can also do this to make it a little more readable: IDLE_OP EQU >0340 . . . DATA IDLE_OP If the assembler had full MACRO support you could do the whole "DATA >0340" as IDLE_OP. Either way, I also recommend using the XDT99 tools: https://atariage.com/forums/topic/233677-xdt99-new-ti-99-cross-development-tools-available/ Edited January 10, 2020 by matthew180 Quote Link to comment Share on other sites More sharing options...
digress Posted January 10, 2020 Share Posted January 10, 2020 (edited) IDLE keyword worked without anything needed got it compiled several times. loaded to 0x3f00. setting those four bytes at 0x3000- 0x3006 checked the video memory using bluemsx to confirm the correct memory locations were updated and they were. running it on the coleco with f18a BML is working. I can move it around though its just garbled graphics when I call the line routine it does alter some vram and can see a little graphic change in the upper left corner but not the line I was expecting getting close. Edited January 16, 2020 by digress Quote Link to comment Share on other sites More sharing options...
Asmusr Posted January 11, 2020 Share Posted January 11, 2020 Are you using the bitmap layer of the F18A (BML) or 9918A mode 2 (GM2)? The code is for BML and would have to be modified for GM2. BTW, having the parameters at >3000 won't work in either case because this area is used for image data. You could use addresses just before or after your GPU program. Quote Link to comment Share on other sites More sharing options...
digress Posted January 11, 2020 Share Posted January 11, 2020 (edited) i'm using 0x0000 for bml base and ignoring tiles for now. it's definately drawing stuff just not correctly yet. reduced bml to 100x100 moved those variables to 0x3de0 area that was blank at the moment i have no sprites or tiles defined so I'm just messing with the BML. I'm even starting to understand the assembler a bit too. setup of screen>>>> vdp_out(0,0); vdp_out(49,0x30); //vdp_out(49,0x33); // tiles ecm3/sprites ecm 3 vdp_out(31,0xE2);//VR31 bit >80 vdp_out(31,0xf0); // BML bitmap layer enable vdp_out(32,0x00);//12288 0x3000 //vdp_out(32,0x00); // BML bitmap base address vdp_out(33,0x00); // BML bitmap Bitmap x vdp_out(34,0x00); // Bitmap y vdp_out(35,0x64); //100 vdp_out(35,0x00); //vdp_out(35,0xFF); // Bitmap width //VR35=0 vdp_out(36,0x64); //100 vdp_out(36,0xB0); //vdp_out(36,0xB0); // Bitmap height //0xB0 load_palette(title_pallette_f18a, 64); vdp_out(2,0x15); // set name table to 0x1800 name_table3=0x3b00; vdp_out(3,0xe0); //224 14436 vdp_out(3,0x80); // set colour table to 0x2000 move to 01b00 + 256 vdp_out(4,0x00); // set tiles table to 0x0000 vdp_out(5,0x1b00); //112 0x1b00 temp dem 54 = 14366 14kb sprites ecm 3 sprites data to 0x2800 = 10K 5*2K vdp_out(6,5); // sprites ecm 3 sprites data to 0x3000 = 12K 5*2K vdp_out(7,0x00);//vdp_out(7,0x41); //VDP_SET_REGISTER( 7, 0x00); // Black border Edited January 11, 2020 by digress Quote Link to comment Share on other sites More sharing options...
digress Posted January 16, 2020 Share Posted January 16, 2020 is there a preferred size of the BML. I got it working a little using a smaller size but if I set to 256x192 it corrupts the graphics & screen modes and sometimes locks up. It's drawing pixels but not as coherant lines yet. if it is using registers 0,1,2,3 they are used for setting the GM1 & GM2 and the name table etc. I'll post a small video so I can show what i'm seeing. Quote Link to comment Share on other sites More sharing options...
Asmusr Posted January 16, 2020 Share Posted January 16, 2020 55 minutes ago, digress said: is there a preferred size of the BML. I got it working a little using a smaller size but if I set to 256x192 it corrupts the graphics & screen modes and sometimes locks up. A 256x192 bitmap is using 12K, so you cannot use anything below 0x3000 for other things. 57 minutes ago, digress said: if it is using registers 0,1,2,3 they are used for setting the GM1 & GM2 and the name table etc. I'll post a small video so I can show what i'm seeing. CPU registers and VPD registers are different, if that's what you mean. On 1/11/2020 at 8:34 PM, digress said: vdp_out(2,0x15); // set name table to 0x1800 Why 0x15? On 1/11/2020 at 8:34 PM, digress said: vdp_out(4,0x00); // set tiles table to 0x0000 This is overlapping the bitmap. On 1/11/2020 at 8:34 PM, digress said: vdp_out(5,0x1b00); //112 0x1b00 temp dem 54 = 14366 14kb sprites ecm 3 sprites data to 0x2800 = 10K 5*2K 0x1b00? Not sure what you're trying to do here? On 1/11/2020 at 8:34 PM, digress said: vdp_out(6,5); // sprites ecm 3 sprites data to 0x3000 = 12K 5*2K 5x0x800 = 0x2800 (overlapping full screen bitmap) You are not setting VDP reg 1, are you sure it's OK? Quote Link to comment Share on other sites More sharing options...
digress Posted January 16, 2020 Share Posted January 16, 2020 I don't what i'm doing at all with the BML setup. Just guessing mostly. just trying to move that stuff out of the way. there are no sprites or tiles set as i was only playing with the BML. i did have a setting for vr1 just was cropped out of the paste above. I'm open to any suggestions. If something wrong that's what i'm trying to figure out. I had it draw a line from 1,1-100,100 diagionally that looked correct a couple of times. here is the more up to date setup 7 a video below vdp_out(0,0); vdp_out(1,0xe2); //mode 2 vdp_out(2,0x14); vdp_out(3,0xe0); //224 14436 vdp_out(3,0x80); // set colour table to 0x2000 move to 01b00 + 256 vdp_out(4,0x06); // set tiles table to 0x0000 vdp_out(5,112); //112 0x1b00 temp dem 54 = 14366 14kb sprites ecm 3 sprites data to 0x2800 = 10K 5*2K vdp_out(6,6); // sprites ecm 3 sprites data to 0x3000 = 12K 5*2K vdp_out(7,0x00);//vdp_out(7,0x41); //VDP_SET_REGISTER( 7, 0x00); // Black border vdp_out(49,0x30); //vdp_out(49,0x33); // tiles ecm3/sprites ecm 3 vdp_out(31,0xE0);//vdp_out(31,0xE0);//VR31 bit >80 vdp_out(31,0xf0); // BML bitmap layer enable vdp_out(32,0x00);//12288 0x3000 //vdp_out(32,0x00); // BML bitmap base address vdp_out(33,0x00); // BML Bitmap x vdp_out(34,0x00); // BML Bitmap y vdp_out(35,100); //256 vdp_out(35,0x00); //vdp_out(35,0xFF); // Bitmap width //VR35=0 vdp_out(36,100); //100 vdp_out(36,0xB0); //vdp_out(36,0xB0); // Bitmap height //0xB0 1 1 Quote Link to comment Share on other sites More sharing options...
Asmusr Posted January 16, 2020 Share Posted January 16, 2020 Maybe you can get some ideas from my source code? You can see this demo in https://js99er.net under Software/F18A specific/GPU PIX lines demo. pixlines.a99 1 Quote Link to comment Share on other sites More sharing options...
digress Posted January 17, 2020 Share Posted January 17, 2020 Fascinating. I'm going through it. thanks. Quote Link to comment Share on other sites More sharing options...
digress Posted February 26, 2020 Share Posted February 26, 2020 I wrote my own slow routine which runs on the z80 only . I'll get back to trying your routine again soon. For some reason I can't get it to work yet. Colecovision with f18a vector graphics example 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.