VinsCool Posted Wednesday at 11:13 AM Share Posted Wednesday at 11:13 AM Hi, I'm currently trying to actually use the RESET button on the keyboard to jump to a custom vector, but I fail to understand what I am doing wrong so far. It seems to be 2 possible methods, one using the NMI vector with NMIST Bit 5 set for a Reset, or the NMI vector from $FFFC directly, but I am unable to get anything to work as it is. So far only tests were done with Altirra Emulator, so maybe this is where I'm doing something wrong? I would like to try on hardware later today if I can verify I'm not getting crazy over something that seems simple to do. I've managed to set up NMI and IRQ for pretty much anything but RESET is the only one I'm unable to get to work and I feel really dumb because of that. If anyone knows the solution, either the NMI Bit 5 or the $FFFC vector would work for me, ideally I'd prefer using $FFFC since I'm already using the disabled OS ROM approach to specifically use the $FFFx addresses, but at this point anything could work because I'm getting frustrated over not being able to use that darned Reset button, haha! Have a good day! Quote Link to comment Share on other sites More sharing options...
Rybags Posted Wednesday at 12:13 PM Share Posted Wednesday at 12:13 PM System Reset goes through the NMI only on 400/800. On XL/XE the Reset key is a hardware reset. So, a couple of problems achieving what you want: Stock 400/800 doesn't have the ability to have the hardware vectors/OS residing in Ram. The XL/XE - a hardware reset will send the PIA back to it's default state which is outputting all 1s on PORTB. As such, there's no point changing the Reset vector in a Ram based OS as it'll never get used. Also - a relative recent discovery (bug in Antic actually) is the "missed NMI" - the problem is that Antic only pulls NMI for about 2 cycles so a concurrent IRQ can cause it to be missed. As such you can use Pokey Timer IRQs to disable the System Reset key on the 400/800. In theory you could modify an XL to add a System Reset that generates NMI then use it with a modified OS. This could be handy for debugging as an NMI is much less disruptive than a hardware reset. You could use it to take small memory snapshots then return to program execution. 1 Quote Link to comment Share on other sites More sharing options...
TGB1718 Posted Wednesday at 12:34 PM Share Posted Wednesday at 12:34 PM Couldn't you use something like CASINI boot vector to a small piece of code that will enable the OS RAM area and JMP to your vector ? 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted Wednesday at 12:40 PM Share Posted Wednesday at 12:40 PM You can do such things. But at that point, much of the system initialization has taken place. The nice thing about the reset vector and also the cart run vector in diag mode - you get control practically straight away. 1 Quote Link to comment Share on other sites More sharing options...
Gury Posted Wednesday at 01:20 PM Share Posted Wednesday at 01:20 PM Solution from Moj Mikro magazine: Link 1 1 Quote Link to comment Share on other sites More sharing options...
VinsCool Posted Wednesday at 07:40 PM Author Share Posted Wednesday at 07:40 PM 7 hours ago, Rybags said: System Reset goes through the NMI only on 400/800. On XL/XE the Reset key is a hardware reset. So, a couple of problems achieving what you want: Stock 400/800 doesn't have the ability to have the hardware vectors/OS residing in Ram. The XL/XE - a hardware reset will send the PIA back to it's default state which is outputting all 1s on PORTB. As such, there's no point changing the Reset vector in a Ram based OS as it'll never get used. Interesting, so my observation from my earlier attempt was the correct behaviour, I learn something new everyday! I guess I was spoiled growing up with game consoles such as the NES and expect the Reset button to actually reset the game it is running, and not the entire machine! Haha! I might probably just assign a keyboard key to a BRK entrypoint and perform the Software Reset from it, in this case. All I really wanted was to press a key to initiate a Reset, so I thought mapping it to the actual Reset button would have made the most sense for that, but hey that is not a big deal if it was not designed to be used that way. 6 hours ago, Rybags said: You can do such things. But at that point, much of the system initialization has taken place. The nice thing about the reset vector and also the cart run vector in diag mode - you get control practically straight away. Yeah that was pretty much all I wanted to do here but, yeah, I will make do with the other options available for that. 6 hours ago, Gury said: Solution from Moj Mikro magazine: Link The solution proposed might still be very useful for a hard reset using the Reset button, I had absolutely no idea Casini and Dosini could be hijacked for that exact purpose! Thanks for sharing! 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.