Prevent C128 mode after a RESET from 64 mode

Started by xlar54, December 07, 2007, 07:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

xlar54

Supposedly the following line switches from C128 to 64 mode...

 BANK1: POKE65528,77: POKE 65529,255: BANK15: SYS65357

After this, you must actually turn off and on to return to 128 mode - the reset button wont work.  My physical 128 is put up, so if someone wants to try this and let us know if it works.

jt-3d

Works in VICE with the soft reset. If I think about it, I'll try it on the real deal after work but I guess it'll work as advertised.

jt-3d

Ok, I finally remembered to try it and yes, it does indeed keep you from switching back to 128 mode with the reset button.

Edwing

...by the way... an alternative to this, if you use it a lot, is the hardware solution.

If anybody's interested I can look it up (it's been a while) but basically it makes use of the fact that while a C64 cartridge pulls /GAME and /EXROM to ground, a C128 module only uses /EXROM (or /GAME?) ... so as you may know this is how the C128 tells if a cartridge requires C64 mode & then jumps there upon switching up with a C64 cartridge.

Now you can simply connect that C64 pin to ground (via an interruptor, obviously ;ö) and it'll ALWAYS go to C64 mode on power on and reset.

Oh BTW ... I remember I used a two-way switch that would, in the other non-neutral position, rather connect it to /HI (or something) which means the C128 stays in C128 even with a C64 module inserted.
Effect? Normal C128 mode but you can PEEK (or e.g. disassemble) the module since it also prevents autostart ...
I found it kinda cool to be able to look at & save games by putting a module into my C128 and using the MONITOR for looking at & saving module games as simple as with internal ROMs :öD

Cheers, Edwing

BigDumbDinosaur

Pulling either /EXROM or /GAME low will force C-64 mode.  It doesn't have to be both.  However, pulling /EXROM low causes a search for a ROM at $8000, if memory correctly serves me.  If no ROM is found, the normal reset sequence is executed.
x86?  We ain't got no x86.  We don't need no stinking x86!

Hydrophilic

Wow this topic is over 120 days old according to the helpful forum code.  (Just goes to show that I'm slooooooooooow).

Anyway, I wanted to say that I've analyized the code and yes it does exactly as claimed:  any reset will force C64 mode.

The reason why, for those who are cursious, is because it changes the C128's soft reset vector (a.k.a. "secure") to point to the KERNAL's "GO64" routine.

In other words, after issuing the command of the first post, the C128's "soft reset" (bank 1 $fff8) is set to $ff4d... and $ff4d is the KERNAL code for GO64.

Let me know if you're still confused and I can try to explain further...
I'm kupo for kupo nuts!