Post by mirkosoft on Apr 30, 2015 12:57:25 GMT
Hi!
I found on the web solution how to get internal or external EPROM work no matter of VIC or VDC screen.
First in code is configuration for EPROM, then is code copied to RAM location. In code is set bank 15 and executed.
After finish of execution it fails - in case of ML program it works but after RTS it jumps into MONITOR like code mismatch.
This I wanted to remove by JSR $4003 (JSOFT_RESET) but it returns not back into program, only ends it.
Really it does what I want - removes jump to MLM, but I need return... and JSOFT_RESET maybe clears pointer to return.
Here's code with configuration which makes after RTS jump to MLM like error:
Thank you for every help, reply or comments.
Miro
I found on the web solution how to get internal or external EPROM work no matter of VIC or VDC screen.
First in code is configuration for EPROM, then is code copied to RAM location. In code is set bank 15 and executed.
After finish of execution it fails - in case of ML program it works but after RTS it jumps into MONITOR like code mismatch.
This I wanted to remove by JSR $4003 (JSOFT_RESET) but it returns not back into program, only ends it.
Really it does what I want - removes jump to MLM, but I need return... and JSOFT_RESET maybe clears pointer to return.
Here's code with configuration which makes after RTS jump to MLM like error:
*=$8000
jmp coldstart
jmp warmstart
.byte 1 // 1 = Autostart
.byte $43, $42, $4d // "CBM"
coldstart:
warmstart:
sei
ldx #$ff
txs
cld
lda #$e3
sta $01
lda #$37
sta $00
lda #%00000100 // Bank in Kernal ROM
// BIT 0 : $d000-$dfff (0 = I/O Block / 1 = ROM)
// BIT 1 : $4000-$7fff (1 = RAM / 0 = Basic-LO)
// BIT 2/3 : $8000-$bfff (11 = RAM / 01 = Internal ROM / 10 = External ROM / 00 = Basic-HI)
// BIT 4/5 : $c000-$cfff/$e000-$ffff (00 = Kernal ROM / 01 = Internal ROM / 10 = External ROM / 11 = RAM)
// BIT 6 : RAM used (0 = RAM 0 / 1 = RAM 1)
// BIT 7 : unused (only for cartridges)
// lda #%00001000 : External ROM config
sta $ff00
jsr $ff8a // Restore vectors
jsr $ff84 // Init I/O Devices, Ports & Timers
jsr $ff81 // Init Editor & Video Chips
ldx #00
copy: lda program,x
sta $1800,x
inx
bne copy
jmp $1800
So how to reconfigure all back and make copied code not error reporting? Really is code correctly executed, but can't end jumping to MLM...Thank you for every help, reply or comments.
Miro