How to turn ON and OFF SuperCPU with software method?

Started by MIRKOSOFT, November 21, 2010, 10:08 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MIRKOSOFT



Hi!

I need to turn OFF and later turn ON SuperCPU in program that scans KERNAL and system ROMs of C128...

I mean to REAL TURN OFF and then real ON without any switch - only by software method...

In manual is written about register 53375 which disables hardware registers of SCPU.

I tried to POKE this address with value 0 and 255 but makes not effect...

I need scan real KERNAL & SYSTEM ROMs on board of C128 and until is SCPU turned on, it affects these memory locations...

CAN ANYBODY HELP ME? (I have SCPU128)

Thank you everybody.

Miro
MIRKOSOFT of megabytes

Commodore 64 was great, Commodore 128 is bigger, better, faster and more!!!

http://www.mirkosoft.sk

Wagner

The only way to turn off the SuperCPU is either to flip the external enable/disable switch  to disable, and reboot--or unplug the SuperCPU from the computer.  The hardware registers are not for that purpose.

Caff Fiend

#2
Hi Miro,

I don't know what assembler you're using, or even if this will help you, but most assemblers that can handle both 6502 AND 65816 instructions will let you choose which "mode" you access the SuperCPU in; whether that be Native (65816) or Emulation (6502) modes.

In my assembler (CROSS-32 Meta-Assembler), you can switch the SuperCPU into Emulation mode by simply preceding an instruction with "<", or switch it to Native mode by preceding an instruction with ">". You should always have the SuperCPU in Emulation mode before calling any kernal routines. Here is a brief example from the 65816 table in the CROSS-32 Meta-Assembler that describes how to switch the CPU into both Native and Emulation modes. Your assembler may do it differently:
; NOTE!  THE 65816 TABLE IS WRITTEN WITH THE PROCESSOR
;        IN NATIVE MODE WITH M = 0.  THEREFORE, MOST
; OF THE OPERANDS IN THE IMMEDIATE ADDRESSING
; INSTRUCTIONS ARE TWO BYTES LONG.  TO SPECIFY AN
; IMMEDIATE INSTRUCTION IN EMULATION MODE WITH A
; ONE BYTE OPERAND PLEASE USE A < SIGN.
; I.E.
    ADC    #<33       ;EMULATION
    ADC    #33         ;NATIVE


Hope this helps!  :)

- Will