; Altirra Acid800 test suite ; Copyright (C) 2010 Avery Lee, All Rights Reserved. ; ; Permission is hereby granted, free of charge, to any person obtaining a copy ; of this software and associated documentation files (the "Software"), to deal ; in the Software without restriction, including without limitation the rights ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ; copies of the Software, and to permit persons to whom the Software is ; furnished to do so, subject to the following conditions: ; ; The above copyright notice and this permission notice shall be included in ; all copies or substantial portions of the Software. ; ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ; SOFTWARE. opt h-o- org $0080 memtop equ $02e5 dmactl equ $d400 dlistl equ $d402 wsync equ $d40a vcount equ $d40b nmien equ $d40e a0 dta a(0) a1 dta a(0) a2 dta a(0) a3 dta a(0) runad equ $02e0 initad equ $02e2 opt o+ org $0700 base: dta 0 ;flags dta [testtable - base + $7f] / $80 + 2 dta a($0700) dta a(main) clc rts main: ;move test table up to $1900 ldx #0 copyloop: lda testtable,x sta $1900,x inx bne copyloop ;begin relocation mwa #relocloop runad mwa #relocdata a0 ldy #0 relocloop: ;load starting address mva (a0),y a1 inw a0 mva (a0),y a1+1 inw a0 ;skip $ffff words lda a1 and a1+1 cmp #$ff beq relocloop ;load ending address mva (a0),y a2 inw a0 mva (a0),y a2+1 inw a0 inw a2 mwa #definit initad ;copy data (slow, but oh well) copyloop2: lda (a0),y sta (a1),y inw a0 inw a1 lda a1 cmp a2 bne copyloop2 lda a1+1 cmp a2+1 bne copyloop2 ;init a segment jsr doinit jmp (runad) doinit: jmp (initad) definit: rts ;========================================================================== relocdata: ins 'menu.obx' :((0-*)&$7f) dta 0 testtable: end