0 Members and 1 Guest are viewing this topic.
1. The kernal interrupt routines do not understand shit about 65816 native mode. They need to be patched if you want to use them.
LDA #$0ESTA $FF00CLCXCE;native code goes hereSECXCERTS
If you have roms on and press RESTORE while running native code, you will crash!
Do you actually own a supercpu?
So you must take the interrupts into account or disable them before running any commands using 65816 native mode. The KERNAL rom does not have correct code for 65816 native mode!
* = $2000 lda #$0e sta $ff00 ;Kernal and IO bank clc xce ;native mode rep #$10 ;index registers 16-bits .rl stz $d020 stz $d021 lda $d011 and #$f7 sta d011 ;24 row screeng5 lda #$fbg3 inc $a2 cmp $d012 ;wait for raster to go offscreen bne g3 lda d011 dec a cmp #$10 bcs g4 ;take branch if scrolling one pixel lda #$17 ;reset fine vertical scroll to bottomg4 sta d011 sta $d011 bcs g8 rep #$30 ;accumulator also 16-bits .al ldx #$428 ;screen row 2 source block move address ldy #$400 ;screen row 1 destination block move address lda #1000-40-1 ;960 bytes to move mvn 0,0 ldx #$d828 ;color source ldy #$d800 ;color destination lda #1000-40-1 ;another 960 bytes to move mvn 0,0 clc ldx #38g1 lda $a1 sta $dbc0,x ;put something into row 25 of color RAM rol eor $a1 sta $7c0,x ;put something into row 25 of screen dex dex bpl g1 sep #$20 ;accumulator back to 8-bits .asg8 lda #$fbg6 cmp $d012 ;for the non-MVN 0,0 case beq g6 lda $dc01 bmi g5 ;go back if STOP key not pressed lda #$1b sta $d011 ;reset VIC register sec xce ;return to emulation mode .rs rtsd011 byt $17