vdub_bobby Posted August 5, 2005 Share Posted August 5, 2005 (edited) Can I reliably count on the value in INPT3 if I never write a 1 to bit 7 of VBLANK? EDIT: To be specific, I want to replace this: sta HMCLR sec with this: asl HMCLR Which should strobe HMCLR and shift INPT3 into the carry. ANOTHER EDIT: I just realized that this will work as well: lsr HMCLR Which will strobe HMCLR and shift bit 0 of HMCLR ($2B) into the carry - which should always be the lowest bit of %x0101011. Right? That seems to work in z26 and Stella, and checking a trace log of z26 seems to confirm that the value is consistent. Edited August 5, 2005 by vdub_bobby Quote Link to comment Share on other sites More sharing options...
supercat Posted August 5, 2005 Share Posted August 5, 2005 Can I reliably count on the value in INPT3 if I never write a 1 to bit 7 of VBLANK? I wouldn't. lsr HMCLR Which will strobe HMCLR and shift bit 0 of HMCLR ($2B) into the carry - which should always be the lowest bit of %x0101011. Right? That seems to work in z26 and Stella, and checking a trace log of z26 seems to confirm that the value is consistent. I wouldn't recommend that either. Although a floating data bus will usually read the last thing that appeared on it, relying upon such behavior is IMHO begging for trouble. I know there have been some carts in the past that have relied upon such things, but things like bus capacitance, crosstalk, cartridge-selector boxes, ribbon cables (think Flashback II), etc. can all throw such expected behaviors out the window. Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted August 5, 2005 Author Share Posted August 5, 2005 lsr HMCLR Which will strobe HMCLR and shift bit 0 of HMCLR ($2B) into the carry - which should always be the lowest bit of %x0101011. Right? That seems to work in z26 and Stella, and checking a trace log of z26 seems to confirm that the value is consistent. I wouldn't recommend that either. Although a floating data bus will usually read the last thing that appeared on it, relying upon such behavior is IMHO begging for trouble. I know there have been some carts in the past that have relied upon such things, but things like bus capacitance, crosstalk, cartridge-selector boxes, ribbon cables (think Flashback II), etc. can all throw such expected behaviors out the window. 905274[/snapback] Will it be consistent in the emulators? Quote Link to comment Share on other sites More sharing options...
supercat Posted August 5, 2005 Share Posted August 5, 2005 Will it be consistent in the emulators? 905276[/snapback] I believe older emulators would return the 'undefined' bits as zero, even though when using real hardware they will usually hold the last thing that was on the bus. I believe newer emulators will return the last thing that was on the bus, though I don't know if they all monitor such things carefully. For example: ldx #$80 lda $FF80,x The last thing on the bus prior to the load would be the contents of ROM address $1F00. On the other hand: ldx #$80 lda $0480,x here the last thing on the bus should be the $04 of the instruction although it will have had an extra cycle to 'fade away'. 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.