Post by mirkosoft on Sept 6, 2014 18:30:28 GMT
Hi!
Again maybe unreal thread. Since I began flirt with Z80 assembler I'm experimenting how to reach Z80 in impossible cases:
First it was like "deactivate SCPU by software and switch it". Now I know it's impossible, exist one instruction to stop CPU, but it means make computer dead (STP = Stop Processor), no switch anywhere 'cause SCPU has control over all.
This can be solved by Z80 CPU by CP/M cartridge or Z-80 Videopak (includes also 80 column card for VIC) I'm searching for this cartridge, still not found, so I can't to write more.
But one Q here is: Is possible to activate Z80 from 64 mode?
I know that 64 mode knows not bankswitching and no access 128 ROMs. Here's code to activate Z80 and switch back to 8502 from 128 mode:
So, I know that it looks impossible, but I mean better is ask than abandon fight.
So, knows anyone any possible way to skip bankswitching?
Miro.
Again maybe unreal thread. Since I began flirt with Z80 assembler I'm experimenting how to reach Z80 in impossible cases:
First it was like "deactivate SCPU by software and switch it". Now I know it's impossible, exist one instruction to stop CPU, but it means make computer dead (STP = Stop Processor), no switch anywhere 'cause SCPU has control over all.
This can be solved by Z80 CPU by CP/M cartridge or Z-80 Videopak (includes also 80 column card for VIC) I'm searching for this cartridge, still not found, so I can't to write more.
But one Q here is: Is possible to activate Z80 from 64 mode?
I know that 64 mode knows not bankswitching and no access 128 ROMs. Here's code to activate Z80 and switch back to 8502 from 128 mode:
activateZ80(8502code):
lda $ff00 ; store RAM config
pha ; to stack
sei ; disable interrupts
lda #$c3 ; store JP instruction for Z80 mode start
sta $ffee ; where PC points
lda #<z80start ; store lo-byte where to jump
sta $ffef ; to next byte
lda #>z80start ; store hi-byte where to jump
sta $fff0 ; to next byte
lda #$3e ; select RAM config for Z80
(here's first bank change - in 64 mode unknown)
sta $ff00 ;
lda $d505 ; store mode
pha ; to stack
lda #$b0 ; set Z80 mode
sta $d505 ; this instruction deactivates 8502 and jumps by Z80 PC to $ffee
($d505 is like other addresses in 64 mode, so no this way)
nop ; when is 8502 again activated 8502 PC points here
rts
activate 8502(Z80code):
LD A, $3e ; store memory
LD ($ff00),A ; configuration
(again figures bank operation)
JP $ffe0 ; activate 8502
So, I know that it looks impossible, but I mean better is ask than abandon fight.
So, knows anyone any possible way to skip bankswitching?
Miro.