|
Post by willymanilly on Nov 23, 2019 20:31:15 GMT
As stated from Mapping the Commodore 128 the blanking only covers the text, doesn't erase implies it is safe for the monitor. It doesn't change any frequencies so should be safe for any monitor. I've tested multiple times on my 1084 with no issues. 34 $22 35 $23 Horizontal blanking positions The VDC can adjust its horizontal blanking interval to blank a portion of the screen. These locations control the horizontal width and position of the blanked area. If the blanked area extends onto the active portion of the screen, any text under the blanked area is only covered, not erased. The value in register 34/$22 determines the rightmost blanked column, and the value in register 35/$23 determines the leftmost blanked column. The blanked area extends the entire height of the screen.
458
fiP600-$D601 54784-54785
The value in register 34/$22 must be less than the value in register 0/$00; otherwise, the entire display will be blanked. The value in 34/$22 here must also be greater than the value in register 35/$23 to prevent an entirely blank display. The default values for these locations are 125/S7D and 100/$64, respectively. This positions the blanking interval entirely outside the active screen area. For purposes of blanking an area of the screen, a value of 6/$06 in these registers corresponds to the leftmost column of the standard screen and a value of 85/$55 corresponds to the rightmost column.
Another option to turn the screen black is discussed hereIn summary:- The screen turns black if:-
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.
horizontal smooth scroll (bits 0-3 of VDC register 25) is greater than or equal to the character width (bits 4-7 of VDC register 22) for double pixel mode.
|
|
|
Post by willymanilly on Nov 23, 2019 13:29:29 GMT
Have you tried blanking the screen using HBLANK(VDC registers 34 and 35)? Setting both of them to the same value should blank the screen. Another trick is to set register 34 to a value greater than the total horizontal character positions.
|
|
|
Post by willymanilly on Oct 4, 2019 22:21:06 GMT
so I finally have a demo that works on Z128K but not on real hardware! Or at least not on my hardware. I am not sure exactly what the issue is but I think it's the VDC busy flag clearing too soon on the emulation? I can let you have the .prg if you promise not to spoil the surprise of the demo I am working on... The VDC busy flag emulation in Z64K is getting is reasonably close to real hardware behavior but I know it's still far from perfect. It's something I have on the top of my list to create more tests for and improve. I'll PM you.
|
|
|
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.
|
|
|
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 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 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 willymanilly on Sept 22, 2019 1:58:33 GMT
So, I compiled a program and it runs in VICE, however I just get a blank screen on Z64K !!! I am really confused by this as I didn't think I did anything different to the last few programs I compiled which DO run, I tested them and they run. Very Odd, there should be no real difference in this latest program that would make it not work. I am completely confused by this, I have yet to test on real hardware as my machine is packed away at the moment, but I don't see any reason it wouldn't run! It starts and puts the machine into fast mode as I see the VIC screen go crazy, but the VDC never shows any output unlike in VICE where I see the results of my code... There are a number of reasons why the screen could be blank including what I discussed at the end of How to store charset data if is char more than 8px W 16px H. Soci's VDC test 10 shows an example of where part of the screen turns black because the smooth scroll value is greater than the character width. VICE does not black out any part of the screen for that test program. Z64K does emulate the blacking out and displays the test program correctly. I've attached all of Soci's tests with .prg extension included in filename for easy loading. They all need to be run in c64 mode. Are you happy to send me a copy of the program you are attempting to run so I can have a look so I can rule out the above? Attachments:soci.zip (8.88 KB)
|
|
|
Post by willymanilly on Sept 17, 2019 23:21:12 GMT
No, a total width of less than 8 pixels is invalid and you just get black. i.e. you are restricted to multiples of 8 pixels. Not totally true. The screen turns black if:- - 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.
- horizontal smooth scroll (bits 0-3 of VDC register 25) is greater than or equal to the character width (bits 4-7 of VDC register 22) for double pixel mode.
An example of a 6x12 font is SOCI VDC test 6 available in the VICE test repositiory
|
|
|
Post by willymanilly on Sept 12, 2019 20:40:53 GMT
What is this "SinglePixelMode" you are speaking of? It's just referring to the normal mode of the double pixel feature that is controlled by bit 4 of register 25. i.e. - if bit 5 of VDC register 25 is 0 SinglePixelMode =1 (VDC 80 column) - normal
- if bit 5 of VDC register 25 is 1 SinglePixelMode =0 (VDC 40 column) - double pixel
By default bit 4 is not set so SinglePixeMode would equal 1 in my formula. Another useful formula once you know the pixels/line is clock speed/pixels per line = horizontal frequency where clock speed equals 16000000 for normal mode and 8000000 for double pixel mode. e.g when pixels per line = 1024 (default PAL new rom), horizontal frequency = 16000000/1024 = 15625 Hz.
|
|