| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Detect C128 in C64-mode without exploiting 2mhz mode?
Reason: Easyflash emulation in 1541u2 doesn’t work in 2mhz mode. |
|
| |
Count Zero
Registered: Jan 2003 Posts: 1933 |
No sure about $01 but instead of $37 it always reports $77 on a c128 in c64 mode after powerup. Thing is that other hardware may influence a stock c64 the same way I suppose.
http://unusedino.de/ec64/technical/aay/c64/zp01.htm
Bit 6 description is not clear here. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: No sure about $01 but instead of $37 it always reports $77 on a c128 in c64 mode after powerup. Thing is that other hardware may influence a stock c64 the same way I suppose.
http://unusedino.de/ec64/technical/aay/c64/zp01.htm
Bit 6 description is not clear here.
Ahh very interesting!
Indeed the MOS8502 have P0-P6 defined whereas MOS6510 only have P0-P5.
Digging schematics now. |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
P6 is caps-lock. Since it's generally advised to have caps-lock unpressed during boot P6 will always be 1. Specifically it can never be 1 on a MOS6510.
So if it's P6=1 it's definitely a C128. If P6=0 it still can be a C128. |
| |
Krill
Registered: Apr 2002 Posts: 2981 |
Define "exploiting 2 MHz mode". =)
Is it okay to read $D030 after reset?
Should be $FD (turbo mode off, line-skip off).
(Beware for Turbo Chameleon: it has $FE for turbo mode off but $FF for turbo mode on, which is the same value a C-64 reads there.)
Either way, only C-128 can have bit 1 (line-skip) set to 0. |
| |
chatGPZ
Registered: Dec 2001 Posts: 11387 |
all port bits are there and they also work - see https://sourceforge.net/p/vice-emu/code/HEAD/tree/testprogs/CPU.. ... i dont think they can be used to detect c128 reliably
BUT... whats the problem with 2MHz? just put a small code snippet to RAM, bank out the EF, do what you need to do and switch back? if that still makes U2 freak out.... wtf, its broken. |
| |
Krill
Registered: Apr 2002 Posts: 2981 |
Quote: Define "exploiting 2 MHz mode". =)
Is it okay to read $D030 after reset?
Should be $FD (turbo mode off, line-skip off).
(Beware for Turbo Chameleon: it has $FE for turbo mode off but $FF for turbo mode on, which is the same value a C-64 reads there.)
Either way, only C-128 can have bit 1 (line-skip) set to 0.
Whoops. Should be:
Is it okay to read $D030 after reset?
Should be $FC (turbo mode off, line-skip off). |
| |
chatGPZ
Registered: Dec 2001 Posts: 11387 |
better: if its $ff, then its a c64 |
| |
Krill
Registered: Apr 2002 Posts: 2981 |
Quoting Groepazbetter: if its $ff, then its a c64 Or a Turbo Chameleon in turbo mode, no? |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: all port bits are there and they also work - see https://sourceforge.net/p/vice-emu/code/HEAD/tree/testprogs/CPU.. ... i dont think they can be used to detect c128 reliably
BUT... whats the problem with 2MHz? just put a small code snippet to RAM, bank out the EF, do what you need to do and switch back? if that still makes U2 freak out.... wtf, its broken.
Never even considered that! Stupid me! :D |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Whoops. Should be:
Is it okay to read $D030 after reset?
Should be $FC (turbo mode off, line-skip off).
Yes, that's a good solution also! |
... 40 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 | 3 | 4 | 5 - Next |