+Karl G Posted February 24, 2021 Share Posted February 24, 2021 According the the Stella Programmer's Guide, bit 2 of VBLANK isn't used, but I have seen code examples where it is set along with bit 1. Does it have any undocumented effect when this bit is set? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted February 24, 2021 Share Posted February 24, 2021 Not that I am aware of. Do you have some code examples? Quote Link to comment Share on other sites More sharing options...
+Andrew Davie Posted February 24, 2021 Share Posted February 24, 2021 Probably someone's conflated "bit 1" with "2" and thought it was "bit 1 and 2" and set 'em both...? Quote Link to comment Share on other sites More sharing options...
+Karl G Posted February 24, 2021 Author Share Posted February 24, 2021 I have seen it in the source code for batari Basic's standard kernel, and I had thought I had seen it elsewhere, too, but I'm not sure now. Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 24, 2021 Share Posted February 24, 2021 I'm not seeing it in the bB standard kernel... am I missing it? Quote Link to comment Share on other sites More sharing options...
+Karl G Posted February 24, 2021 Author Share Posted February 24, 2021 1 hour ago, RevEng said: I'm not seeing it in the bB standard kernel... am I missing it? I guess I was remembering wrong. I can't find an example of it for 2600 code, after all. I do see it in 7800Basic in std_routines.asm. Does this bit have a meaning on the 7800 specifically? Quote Link to comment Share on other sites More sharing options...
RevEng Posted February 24, 2021 Share Posted February 24, 2021 Yeah, the usage of those bits is unique to the 7800 running in 7800 mode, and also unique to leaving the INPTCTRL register unlocked. Until the INPTCTRL register is locked, any hits to TIA locations also hit INPTCTRL with the same values. Normally, 7800 games will lock INPTCTRL at boot, making this concern moot. But I sometimes use 7800basic to create utilities that interact with INPTCTRL (e.g. the 7800 utility cart keeps INPTCTRL unlocked at first, so it can peek at the BIOS and generate a CRC signature) so my VBLANK (and other TIA register) usage takes that into account where possible. 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.