; 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. !src "common.s" * = $2000 main: ldy #>testname lda #$2800 sta $a0+1 ldy #0 tya jsr _waitVCount ;inc wsync ldx #210 tloop14: lda (a0),y dex bne tloop14 ldx vcount !if (MODE = 0) { +_ASSERTX ((3*$0a)+3), 14 } !if (MODE = 1) { +_ASSERTX ((3*$0a)+2), 14 } ;c"Incorrect LDA (zp),Y (1) cycle count: %d-5" ;test LDA (zp),y, page crossing ;+mwa $28FF, $a0 lda #<$28ff sta $a0 lda #>$28ff sta $a0+1 ldy #1 lda #0 jsr _waitVCount ;inc wsync ldx #210 tloop15: lda (a0),y dex bne tloop15 ldx vcount !if (MODE = 0) { +_ASSERTX ((3*$0b)+0), 15 } !if (MODE = 1) { +_ASSERTX ((3*$0a)+2), 15 } ;c"Incorrect LDA (zp),Y (2) cycle count: %d-5" ;test LDA (zp),X ;+mwa $28FF, $a0 lda #<$28ff sta $a0 lda #>$28ff sta $a0+1 ldx #0 lda #0 jsr _waitVCount ;inc wsync ldy #210 tloop16: lda (a0,x) dey bne tloop16 ldx vcount !if (MODE = 0) { +_ASSERTX ((3*$0b)+3), 16 } !if (MODE = 1) { +_ASSERTX ((3*$0b)+2), 16 } ;c"Incorrect LDA (zp,X) cycle count: %d-5" jmp _testPassed testname: !scr "CPU: Timing",0 testbuf = $2800 ;$2800-2FFF reserved