|
Post by Pyrofer on Sept 22, 2019 12:14:58 GMT
Well, you get a pat on the back from me again I get a blank screen on real hardware too! Thanks for the tip on the smooth scroll registers thing, i will check that out.
|
|
|
Post by Pyrofer on Sept 22, 2019 12:17:29 GMT
No need to send the program I think, I bet the issue is right here,
const int vdcreg[38]={127, //00 Horizontal Total 80, //01 Horizontal Displayed 102, //02 Horizontal Sync Position 73, //03 Vertical/Horizontal Sync Width 130, //04 Vertical Total 38 for 8pixel high chars (130 for 2px high) 0, //05 Vertical Adjust 100, //06 Vertical Displayed 25 for 8pix high (100 for 2px high) 116, //07 Vertical Sync Position 32 for 8px high (128 for 2px high) 0, //08 Interlace Mode 1, //09 Character Total Vertical 160, //0A Cursor Mode, Cursor Start Scan Line 231, //0B Cursor End scan Line 0, //0C Display Start Address High Byte 0, //0D Display Start Address Low Byte 0, //0E Cursor Position High Byte 0, //0F Cursor Position Low Byte 0, //10 Light Pen Vertical Position High Byte 0, //11 Light Pen Vertical Position Low Byte 15, //12 Update Address High Byte 208, //13 Update Address Low Byte 62, //14 Attribute Start Address High Byte (8) 128, //15 Attribute Start Address Low Byte (0) 120, //16 Character Total Horizontal, Character Display Horizontal 2, //17 Character Display Vertical (232) 15, //18 Vertical Smooth Scrolling (32) 207, //19 Horizontal Smooth scroll and Video mode (71) (192) (207 works) 240, //1A Forground/Background Colour 0, //1B Address Increment Per Row 63, //1C Ram type installed / character rom address 231, //1D Underline Scan Line 79, //1E Word Count 255, //1F Data Register 0, //20 Block Start Address High Byte 0, //21 Block Start Address Low Byte 125, //22 Display Enable Begin 100, //23 Display Enable End 0, //24 DRAM Refresh Rate 0}; //25 Sync Polarity
|
|
|
Post by willymanilly on Sept 22, 2019 13:30:30 GMT
.. 120, //16 Character Total Horizontal, Character Display Horizontal .. .. .. 207, //19 Horizontal Smooth scroll and Video mode (71) (192) (207 works) Yes, the issue is most likely the Horizontal Smooth scroll value. It shouldn't be greater than Character Total Horizontal. A value of 207 ($CF) in VDC register 25 ($19) would turn black when VDC register 22 ($16) has a value of 120 ($78) horizontal smooth scroll (bits 0-3 of VDC register 25) is greater than the character width (bits 4-7 of VDC register 22) for single pixel mode.bits 0-3 of VDC register 25 = F, bits 4-7 of VDC register 22 = 7 F>7 therefore screen turns black.
|
|
|
Post by Pyrofer on Sept 22, 2019 15:02:54 GMT
Yes, it works when I changed that value to 7....
Ok, so I guess I made a mess trying to work out the settings for a 8x2 colour bitmap screen in NTSC (200pixels total). It now shows on real hardware but looks a mess, what other settings did I cabbage?
|
|
|
Post by tokra on Sept 22, 2019 19:22:43 GMT
Can't see anything terribly wrong with it. If you aim for NTSC you should go for 126 in reg 0 and 131 in reg 4 (131+1)*2 = 264 as that matches Commodore's original settings from the NTSC-ROM. For bitmap-mode (reg 25 = 199) you do not need to set reg 23, this is for text-mode only I think. reg 7 (vertical sync) is something you need to play around with a little sometimes. 128 should be correct, you use 116?
|
|
|
Post by Pyrofer on Sept 23, 2019 17:48:00 GMT
Got things mostly working, thanks for your help.
I keep using VICE as I can just drag and drop files to test.. Big mistake. I need to give up on VICE and use Z64K full time.
Anyway, I'm learning a lot, getting better at asm and working hard on my demo!
|
|
|
Post by willymanilly on Sept 23, 2019 23:07:40 GMT
Got things mostly working, thanks for your help. I keep using VICE as I can just drag and drop files to test.. Big mistake. I need to give up on VICE and use Z64K full time. Anyway, I'm learning a lot, getting better at asm and working hard on my demo! I look forward to seeing your demo! Glad I could be of some assistance. re: drag and drop, I had that implemented but it seems I might have accidently disabled that functionality with one of the a later releases. I will make sure it is re-enabled when I finally get some time to work on Z64K again.
|
|
|
Post by Pyrofer on Sept 24, 2019 8:20:59 GMT
I just got caught out again by vice not emulating the VDC busy flag correctly. "oooh, runs well and really fast" on vice. "Omg, whats this slow garbage?" on Z68K. Man. At least Z68K is faster than trying on real hardware! Now it's just my coding skills that are the issue. Thanks again for all the hard work put into this emulator, without it I would be relying on VICE and the occational run on real HW and getting nowhere fast. I do the compile on a remote server and use winSCP to download the resulting file. It calls it a .c128 too, could you add that as a file type? doing "load prg" hides the file and I have to rename it every time. If I could just drag and drop from winscp to z68k and have it auto-run it would speed things up a lot
|
|
|
Post by willymanilly on Sept 25, 2019 2:16:59 GMT
I found a bug with the drag and drop functionality. I've fixed it now and uploaded new version of Z64K to the website. I've also added .128 file support. I haven't thoroughly tested the updates yet but it should all work. It was only a very minor change. Let me know if you find any issues.
|
|
|
Post by willymanilly on Sept 25, 2019 11:53:09 GMT
I just noticed you said .c128 extension instead of .128 extension so I've uploaded another version of Z64K to the website with that fixed.
|
|