| |
Krill
Registered: Apr 2002 Posts: 2980 |
$D016 bit 5
There is this mysterious bit early on in the KERNAL reset routine:
FCEF: 8E 16 D0 STX $D016 ; VIC: Control Register 2 with X being anything in [0..5].
Now, some people [who?] claim that without this store to $d016, some [which?] cartridges won't start [citation needed].
However, $D016 apparently used to have a mysterious "reset bit" in supposedly early VIC-II revisions (those with only 5 not 9 luma steps, and then the early ones of those).
| Bit 5 | Reset-Bit: 1 = Stop VIC (no Video Out, no RAM |
| | refresh, no bus access) | Could this be the reason why some things on some machines (?) won't start without that store to $D016?
Do any machines still exist where setting $D016 to, say, $f8 would crash them (when running code from RAM)?
Or did this "reset bit" never exist? =) |
|
... 66 posts hidden. Click here to view all posts.... |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Also in the C64 Programmer's Reference (second printing 1983), p447, this is stated:
"The reset bit (RES) in register 22 ($16) is not used for normal operation. Therefore it should be set to "0" when initializing the video chip. When set to a "1," the entire operation of the video chip is suspended, including video outputs and sync, memory refresh, and system bus access."
pdf: http://cini.classiccmp.org/pdf/Commodore/C64%20Programmer%27s%2.. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Posted a request here
Interestingly, the german "64 Intern" (which is basically a ripoff/translation of the PRG) does not describe bit 5 at all. To me that hints at it perhaps being removed from later editions of the PRG too. Maybe :) |
| |
ws
Registered: Apr 2012 Posts: 251 |
Hej, just something i remembered is, that exactly this (screen going black, machine halting) happened to me a long time ago on my C128 in C64 mode while fiddling around with D016.
I remember this, because that is how i initially learned that one shouldn't just write untreated values into any register ("Oh, that is what this AND + OR is for!").
Sadly i don't own that machine anymore. Did anyone try this on a C128 (the reduced C64-like case version, not D)?
Please excuse if i am too far off topic. |
| |
tlr
Registered: Sep 2003 Posts: 1790 |
Quote: Hej, just something i remembered is, that exactly this (screen going black, machine halting) happened to me a long time ago on my C128 in C64 mode while fiddling around with D016.
I remember this, because that is how i initially learned that one shouldn't just write untreated values into any register ("Oh, that is what this AND + OR is for!").
Sadly i don't own that machine anymore. Did anyone try this on a C128 (the reduced C64-like case version, not D)?
Please excuse if i am too far off topic.
The C128 PRG does state for $d016: "5 ALWAYS SET THIS BIT TO 0"
here (p547): https://www.pagetable.com/docs/Commodore%20128%20Programmer%27s..
Never noted that before but I've never really dug into the C128. Does that bit do anything? |
| |
Jetboy
Registered: Jul 2006 Posts: 338 |
It does.
I remember fixing some demos to write nicely to $d016 to be able to run them on my c128. There were not many that needed that. I don't remember which ones were those. It was 25++ years ago :) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
And you don't mix it up with $d030? |
| |
ws
Registered: Apr 2012 Posts: 251 |
I personally am sure that i don't mix it up with $d030 because i actually wrote one (lost) intro that uses the "switch mhz mode in the border" trick. |
| |
Jetboy
Registered: Jul 2006 Posts: 338 |
> And you don't mix it up with $d030?
There is such possibility.
Fiddling with bit 5 in vice 128 does not matter (both c128 and c64 modes). I do not have real HW to check. |
| |
GeirS
Registered: Jan 2014 Posts: 4 |
Quoting chatGPZTo me that hints at it perhaps being removed from later editions of the PRG too. Maybe :)
I can confirm that the textual description of the reset bit has been removed from Appendix N in my printed PRG (first edition, fourth printing - 1983.) There's just some extra empty space between the "Reset" heading and the next "Theory of operation" heading. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Ha! |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 - Next |