repo_id
string
size
int64
file_path
string
content
string
xboot/libxnes
1,593
documents/test-roms/cpu_flag_concurrency/source/common/build_rom.s
; Builds program as iNES ROM ; Default is 16K PRG and 8K CHR ROM, NROM (0) .if 0 ; Options to set before .include "shell.inc": CHR_RAM=1 ; Use CHR-RAM instead of CHR-ROM CART_WRAM=1 ; Use mapper that supports 8K WRAM in cart CUSTOM_MAPPER=n ; Specify mapper number .endif .ifndef CUSTOM_MAPPER .ifdef CART_...
xboot/libxnes
4,298
documents/test-roms/cpu_flag_concurrency/source/common/console.s
; Scrolling text console with line wrapping, 30x29 characters. ; Buffers lines for speed. Will work even if PPU doesn't ; support scrolling (until text reaches bottom). Keeps border ; along bottom in case TV cuts it off. ; ; Defers most initialization until first newline, at which ; point it clears nametable and makes ...
xboot/libxnes
1,096
documents/test-roms/cpu_flag_concurrency/source/common/text_out.s
; Text output as expanding zero-terminated string at text_out_base ; The final exit result byte is written here final_result = $6000 ; Text output is written here as an expanding ; zero-terminated string text_out_base = $6004 bss_res text_out_temp zp_res text_out_addr,2 init_text_out: ldx #0 ; Put valid data fi...
xboot/libxnes
2,024
documents/test-roms/cpu_flag_concurrency/source/common/ppu.s
; PPU utilities bss_res ppu_not_present ; Sets PPUADDR to w ; Preserved: X, Y .macro set_ppuaddr w bit PPUSTATUS setb PPUADDR,>w setb PPUADDR,<w .endmacro ; Delays by no more than n scanlines .macro delay_scanlines n .if CLOCK_RATE <> 1789773 .error "Currently only supports NTSC" .endif delay ((n)*341)/3 .e...
xboot/libxnes
4,660
documents/test-roms/cpu_flag_concurrency/source/common/shell.s
; Common routines and runtime ; Detect inclusion loops (otherwise ca65 goes crazy) .ifdef SHELL_INCLUDED .error "shell.s included twice" .end .endif SHELL_INCLUDED = 1 ;**** Special globals **** ; Temporary variables that ANY routine might modify, so ; only use them between routine calls. temp = <$A temp2 = <$B...
xboot/libxnes
5,124
documents/test-roms/cpu_flag_concurrency/source/common/delay.s
; Delays in CPU clocks, milliseconds, etc. All routines are re-entrant ; (no global data). No routines touch X or Y during execution. ; Code generated by macros is relocatable; it contains no JMPs to itself. zp_byte delay_temp_ ; only written to ; Delays n clocks, from 2 to 16777215 ; Preserved: A, X, Y, flags .macro...
xboot/libxnes
1,638
documents/test-roms/cpu_flag_concurrency/source/common/crc.s
; CRC-32 checksum calculation zp_res checksum,4 zp_byte checksum_temp zp_byte checksum_off_ ; Turns CRC updating on/off. Allows nesting. ; Preserved: A, X, Y crc_off: dec checksum_off_ rts crc_on: inc checksum_off_ beq :+ jpl internal_error ; catch unbalanced crc calls : rts ; Initializes checksum modul...
xboot/libxnes
7,782
documents/test-roms/instr_timing/source/1-instr_timing.s
; Tests instruction timing for all except the 8 branches and 12 halts ; ; Times each instruction by putting it in a loop that counts iterations ; and waits for APU length counter to expire. CUSTOM_IRQ=1 .include "shell.inc" zp_byte nothing_failed zp_byte test_index zp_byte type_mask zp_byte saved_sp stack_copy = $600...
xboot/libxnes
2,427
documents/test-roms/instr_timing/source/2-branch_timing.s
; Verifies timing of branch instructions ; ; Runs branch instruction in loop that counts iterations ; until APU length counter expires. Moves the loop around ; in memory to trigger page cross/no cross cases. .include "shell.inc" zp_byte opcode zp_byte flags zp_byte time_ptr bss_res times,8 main: set_test 0 for_loo...
xboot/libxnes
1,856
documents/test-roms/instr_timing/source/common/testing.s
; Utilities for writing test ROMs ; In NVRAM so these can be used before initializing runtime, ; then runtime initialized without clearing them nv_res test_code ; code of current test nv_res test_name,2 ; address of name of current test, or 0 of none ; Sets current test code and optional name. Also resets ; checksum...
xboot/libxnes
2,660
documents/test-roms/instr_timing/source/common/print.s
; Prints values in various ways to output, ; including numbers and strings. newline = 10 zp_byte print_temp_ ; Prints indicated register to console as two hex ; chars and space ; Preserved: A, X, Y, flags print_a: php pha print_reg_: jsr print_hex lda #' ' jsr print_char_ pla plp rts print_x: php pha txa...
xboot/libxnes
1,506
documents/test-roms/instr_timing/source/common/build_rom.s
; Builds program as iNES ROM ; Default is 32K PRG and 8K CHR ROM, NROM (0) .if 0 ; Options to set before .include "shell.inc": CHR_RAM=1 ; Use CHR-RAM instead of CHR-ROM CART_WRAM=1 ; Use mapper that supports 8K WRAM in cart CUSTOM_MAPPER=n ; Specify mapper number .endif .ifndef CUSTOM_MAPPER .ifdef CART_...
xboot/libxnes
5,523
documents/test-roms/instr_timing/source/common/console.s
; Scrolling text console with line wrapping, 30x29 characters. ; Buffers lines for speed. Will work even if PPU doesn't ; support scrolling (until text reaches bottom). Keeps border ; along bottom in case TV cuts it off. ; ; Defers most initialization until first newline, at which ; point it clears nametable and makes ...
xboot/libxnes
1,096
documents/test-roms/instr_timing/source/common/text_out.s
; Text output as expanding zero-terminated string at text_out_base ; The final exit result byte is written here final_result = $6000 ; Text output is written here as an expanding ; zero-terminated string text_out_base = $6004 bss_res text_out_temp zp_res text_out_addr,2 init_text_out: ldx #0 ; Put valid data fi...
xboot/libxnes
2,024
documents/test-roms/instr_timing/source/common/ppu.s
; PPU utilities bss_res ppu_not_present ; Sets PPUADDR to w ; Preserved: X, Y .macro set_ppuaddr w bit PPUSTATUS setb PPUADDR,>w setb PPUADDR,<w .endmacro ; Delays by no more than n scanlines .macro delay_scanlines n .if CLOCK_RATE <> 1789773 .error "Currently only supports NTSC" .endif delay ((n)*341)/3 .e...
xboot/libxnes
5,433
documents/test-roms/instr_timing/source/common/shell.s
; Common routines and runtime ; Detect inclusion loops (otherwise ca65 goes crazy) .ifdef SHELL_INCLUDED .error "shell.s included twice" .end .endif SHELL_INCLUDED = 1 ; Temporary variables that ANY routine might modify, so ; only use them between routine calls. temp = <$A temp2 = <$B temp3 = <$C addr = <$E p...
xboot/libxnes
3,437
documents/test-roms/instr_timing/source/common/delay.s
; Delays in CPU clocks, milliseconds, etc. All routines are re-entrant ; (no global data). No routines touch X or Y during execution. ; Code generated by macros is relocatable; it contains no JMPs to itself. zp_byte delay_temp_ ; only written to ; Delays n clocks, from 2 to 16777215 ; Preserved: A, X, Y, flags .macro...
xboot/libxnes
1,632
documents/test-roms/instr_timing/source/common/crc.s
; CRC-32 checksum calculation zp_res checksum,4 zp_byte checksum_temp zp_byte checksum_off_ ; Turns CRC updating on/off. Allows nesting. ; Preserved: A, X, Y crc_off: dec checksum_off_ rts crc_on: inc checksum_off_ beq :+ jpl internal_error ; catch unbalanced crc calls : rts ; Initializes checksum modul...
xboot/libxnes
4,299
documents/test-roms/cpu_exec_space/source/test_cpu_exec_space_apu.s
; Expected output, and explanation: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; TEST: test_cpu_exec_space_apu ; This program verifies that the ; CPU can execute code from any ; possible location that it can ; address, including I/O space. ; ; In this test, it is also ; verified that not only all ; write-only APU I/O po...
xboot/libxnes
15,569
documents/test-roms/cpu_exec_space/source/test_cpu_exec_space_ppuio.s
; Expected output, and explanation: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; TEST: test_cpu_exec_space ; This program verifies that the ; CPU can execute code from any ; possible location that it can ; address, including I/O space. ; ; In addition, it will be tested ; that an RTS instruction does a ; dummy read of ...
xboot/libxnes
1,856
documents/test-roms/cpu_exec_space/source/common/testing.s
; Utilities for writing test ROMs ; In NVRAM so these can be used before initializing runtime, ; then runtime initialized without clearing them nv_res test_code ; code of current test nv_res test_name,2 ; address of name of current test, or 0 of none ; Sets current test code and optional name. Also resets ; checksum...
xboot/libxnes
5,516
documents/test-roms/cpu_exec_space/source/common/print.s
; Prints values in various ways to output, ; including numbers and strings. newline = 10 zp_byte print_temp_ ; Prints indicated register to console as two hex ; chars and space ; Preserved: A, X, Y, flags print_a: php pha print_reg_: jsr print_hex lda #' ' jsr print_char_ pla plp rts print_x: php pha txa...
xboot/libxnes
1,593
documents/test-roms/cpu_exec_space/source/common/build_rom.s
; Builds program as iNES ROM ; Default is 16K PRG and 8K CHR ROM, NROM (0) .if 0 ; Options to set before .include "shell.inc": CHR_RAM=1 ; Use CHR-RAM instead of CHR-ROM CART_WRAM=1 ; Use mapper that supports 8K WRAM in cart CUSTOM_MAPPER=n ; Specify mapper number .endif .ifndef CUSTOM_MAPPER .ifdef CART_...
xboot/libxnes
4,298
documents/test-roms/cpu_exec_space/source/common/console.s
; Scrolling text console with line wrapping, 30x29 characters. ; Buffers lines for speed. Will work even if PPU doesn't ; support scrolling (until text reaches bottom). Keeps border ; along bottom in case TV cuts it off. ; ; Defers most initialization until first newline, at which ; point it clears nametable and makes ...
xboot/libxnes
1,096
documents/test-roms/cpu_exec_space/source/common/text_out.s
; Text output as expanding zero-terminated string at text_out_base ; The final exit result byte is written here final_result = $6000 ; Text output is written here as an expanding ; zero-terminated string text_out_base = $6004 bss_res text_out_temp zp_res text_out_addr,2 init_text_out: ldx #0 ; Put valid data fi...
xboot/libxnes
2,024
documents/test-roms/cpu_exec_space/source/common/ppu.s
; PPU utilities bss_res ppu_not_present ; Sets PPUADDR to w ; Preserved: X, Y .macro set_ppuaddr w bit PPUSTATUS setb PPUADDR,>w setb PPUADDR,<w .endmacro ; Delays by no more than n scanlines .macro delay_scanlines n .if CLOCK_RATE <> 1789773 .error "Currently only supports NTSC" .endif delay ((n)*341)/3 .e...
xboot/libxnes
4,660
documents/test-roms/cpu_exec_space/source/common/shell.s
; Common routines and runtime ; Detect inclusion loops (otherwise ca65 goes crazy) .ifdef SHELL_INCLUDED .error "shell.s included twice" .end .endif SHELL_INCLUDED = 1 ;**** Special globals **** ; Temporary variables that ANY routine might modify, so ; only use them between routine calls. temp = <$A temp2 = <$B...
xboot/libxnes
3,445
documents/test-roms/cpu_exec_space/source/common/delay.s
; Delays in CPU clocks, milliseconds, etc. All routines are re-entrant ; (no global data). No routines touch X or Y during execution. ; Code generated by macros is relocatable; it contains no JMPs to itself. zp_byte delay_temp_ ; only written to ; Delays n clocks, from 2 to 16777215 ; Preserved: A, X, Y, flags .macro...
xboot/libxnes
1,632
documents/test-roms/cpu_exec_space/source/common/crc.s
; CRC-32 checksum calculation zp_res checksum,4 zp_byte checksum_temp zp_byte checksum_off_ ; Turns CRC updating on/off. Allows nesting. ; Preserved: A, X, Y crc_off: dec checksum_off_ rts crc_on: inc checksum_off_ beq :+ jpl internal_error ; catch unbalanced crc calls : rts ; Initializes checksum modul...
xboot/libxnes
1,881
documents/test-roms/cpu_interrupts_v2/source/3-nmi_and_irq.s
; NMI behavior when it interrupts IRQ vectoring. ; ; Result when run: ; NMI IRQ ; 23 00 NMI occurs before LDA #1 ; 21 00 NMI occurs after LDA #1 (Z flag clear) ; 21 00 ; 20 00 NMI occurs after CLC, interrupting IRQ ; 20 00 ; 20 00 ; 20 00 ; 20 00 ; 20 00 ; 20 00 Same result for 7 clocks before IRQ is vectored...
xboot/libxnes
1,373
documents/test-roms/cpu_interrupts_v2/source/4-irq_and_dma.s
; Has IRQ occur at various times around sprite DMA. ; First column refers to what instruction IRQ occurred ; after. Second column is time of IRQ, in CPU clocks relative ; to some arbitrary starting point. ; ; 0 +0 ; 1 +1 ; 1 +2 ; 2 +3 ; 2 +4 ; 4 +5 ; 4 +6 ; 7 +7 ; 7 +8 ; 7 +9 ; 7 +10 ; 8 +11 ; 8 +12 ; 8 +13 ; ... ; 8 +...
xboot/libxnes
1,790
documents/test-roms/cpu_interrupts_v2/source/2-nmi_and_brk.s
; NMI behavior when it interrupts BRK. Occasionally fails on ; NES due to PPU-CPU synchronization. ; ; Result when run: ; NMI BRK -- ; 27 36 00 NMI before CLC ; 26 36 00 NMI after CLC ; 26 36 00 ; 36 00 00 NMI interrupting BRK, with B bit set on stack ; 36 00 00 ; 36 00 00 ; 36 00 00 ; 36 00 00 ; 2...
xboot/libxnes
2,787
documents/test-roms/cpu_interrupts_v2/source/5-branch_delays_irq.s
; A taken non-page-crossing branch ignores IRQ during ; its last clock, so that next instruction executes ; before the IRQ. Other instructions would execute the ; NMI before the next instruction. ; ; The same occurs for NMI, though that's not tested here. ; ; test_jmp ; T+ CK PC ; 00 02 04 NOP ; 01 01 04 ; 02 03 07 JM...
xboot/libxnes
3,807
documents/test-roms/cpu_interrupts_v2/source/1-cli_latency.s
; Tests the delay in CLI taking effect, and some basic aspects of IRQ ; handling and the APU frame IRQ (needed by the tests). It uses the APU's ; frame IRQ and first verifies that it works well enough for the tests. ; ; The later tests execute CLI followed by SEI and equivalent pairs of ; instructions (CLI, PLP, where...
xboot/libxnes
1,227
documents/test-roms/cpu_interrupts_v2/source/4-nmi_and_dma.s
; Has IRQ occur at various times around sprite DMA. ; First column refers to what instruction IRQ occurred ; after. Second column is time of IRQ, in CPU clocks relative ; to some arbitrary starting point. CUSTOM_IRQ=1 .include "shell.inc" .include "sync_apu.s" irq: bit SNDCHN rti begin: jsr sync_apu ...
xboot/libxnes
1,852
documents/test-roms/cpu_interrupts_v2/source/common/testing.s
; Utilities for writing test ROMs ; In NVRAM so these can be used before initializing runtime, ; then runtime initialized without clearing them nv_res test_code ; code of current test nv_res test_name,2 ; address of name of current test, or 0 of none ; Sets current test code and optional name. Also resets ; checksum...
xboot/libxnes
3,229
documents/test-roms/cpu_interrupts_v2/source/common/print.s
; Prints values in various ways to output, ; including numbers and strings. newline = 10 zp_byte print_temp_ ; Prints indicated register to console as two hex ; chars and space ; Preserved: A, X, Y, flags print_a: php pha print_reg_: jsr print_hex lda #' ' jsr print_char_ pla plp rts print_x: php pha txa...
xboot/libxnes
3,104
documents/test-roms/cpu_interrupts_v2/source/common/shell_misc.s
; Reports internal error and exits program internal_error: init_cpu_regs print_str newline,"Internal error" lda #255 jmp exit .import __NVRAM_LOAD__, __NVRAM_SIZE__ .macro fill_ram_ Begin, End ; Simpler to count from negative size up to 0, ; and adjust address downward to compensate ; for initial low byte in Y...
xboot/libxnes
1,483
documents/test-roms/cpu_interrupts_v2/source/common/build_rom.s
; Builds program as iNES ROM ; Default is 32K PRG and 8K CHR ROM, NROM (0) .if 0 ; Options to set before .include "shell.inc": CHR_RAM=1 ; Use CHR-RAM instead of CHR-ROM CART_WRAM=1 ; Use mapper that supports 8K WRAM in cart CUSTOM_MAPPER=n ; Specify mapper number .endif .ifndef CUSTOM_MAPPER .ifdef CART_...
xboot/libxnes
5,404
documents/test-roms/cpu_interrupts_v2/source/common/console.s
; Scrolling text console with word wrapping, 30x29 characters. ; ; * Defers PPU initialization until first flush/ newline. ; * Works even if PPU doesn't support scrolling. ; * Keeps border around edge of screen for TV overscan. ; * Requires vertical or single-screen mirroring. ; * Requires ASCII font in CHR. .ifndef C...
xboot/libxnes
1,096
documents/test-roms/cpu_interrupts_v2/source/common/text_out.s
; Text output as expanding zero-terminated string at text_out_base ; The final exit result byte is written here final_result = $6000 ; Text output is written here as an expanding ; zero-terminated string text_out_base = $6004 bss_res text_out_temp zp_res text_out_addr,2 init_text_out: ldx #0 ; Put valid data fi...
xboot/libxnes
3,060
documents/test-roms/cpu_interrupts_v2/source/common/ppu.s
; PPU utilities bss_res ppu_not_present ; Sets PPUADDR to w ; Preserved: X, Y .macro set_ppuaddr w bit PPUSTATUS setb PPUADDR,>w setb PPUADDR,<w .endmacro ; Delays by no more than n scanlines .macro delay_scanlines n .if CLOCK_RATE <> 1789773 .error "Currently only supports NTSC" .endif delay ((n)*341)/3 .e...
xboot/libxnes
2,729
documents/test-roms/cpu_interrupts_v2/source/common/shell.s
; Shell that sets up testing framework and calls main ; Detect inclusion loops (otherwise ca65 goes crazy) .ifdef SHELL_INCLUDED .error "shell.s included twice" .end .endif SHELL_INCLUDED = 1 ; Temporary variables that ANY routine might modify, so ; only use them between routine calls. temp = <$A temp2 = <$B tem...
xboot/libxnes
3,713
documents/test-roms/cpu_interrupts_v2/source/common/sync_vbl.s
; Synchronizes EXACTLY to VBL, to accuracy of 1/3 CPU clock ; (1/2 CPU clock if PPU is enabled). Reading PPUSTATUS ; 29768 clocks or later after return will have bit 7 set. ; Reading PPUSTATUS immediately will have bit 7 clear. ; Preserved: A, X, Y ; Time: 120-330 msec .align 128 sync_vbl: pha ; Disable interrupts ...
xboot/libxnes
3,437
documents/test-roms/cpu_interrupts_v2/source/common/delay.s
; Delays in CPU clocks, milliseconds, etc. All routines are re-entrant ; (no global data). No routines touch X or Y during execution. ; Code generated by macros is relocatable; it contains no JMPs to itself. zp_byte delay_temp_ ; only written to ; Delays n clocks, from 2 to 16777215 ; Preserved: A, X, Y, flags .macro...
xboot/libxnes
1,632
documents/test-roms/cpu_interrupts_v2/source/common/crc.s
; CRC-32 checksum calculation zp_res checksum,4 zp_byte checksum_temp zp_byte checksum_off_ ; Turns CRC updating on/off. Allows nesting. ; Preserved: A, X, Y crc_off: dec checksum_off_ rts crc_on: inc checksum_off_ beq :+ jpl internal_error ; catch unbalanced crc calls : rts ; Initializes checksum modul...
xboot/libxnes
9,413
documents/test-roms/spritecans-2011/src/sprite.s
; ; sprite.asm ; 64 Sprite Cans intro for NES ; Copyright 2000-2011 Damian Yerrick ;;; Copyright (C) 2000-2011 Damian Yerrick ; ; This program is free software; you can redistribute it and/or ; modify it under the terms of the GNU General Public License ; as published by the Free Software Foundation; either vers...
xboot/libxnes
2,026
documents/test-roms/spritecans-2011/src/paldetect.s
; ; NES TV system detection code ; Copyright 2011 Damian Yerrick ; ; Copying and distribution of this file, with or without ; modification, are permitted in any medium without royalty ; provided the copyright notice and this notice are preserved. ; This file is offered as-is, without any warranty. ; .export getTVSystem...
xboot/libxnes
6,765
documents/test-roms/spritecans-2011/src/music.s
; music.s ; part of sound engine for LJ65 ;;; Copyright (C) 2009-2011 Damian Yerrick ; ; This program is free software; you can redistribute it and/or ; modify it under the terms of the GNU General Public License ; as published by the Free Software Foundation; either version 3 ; of the License, or (at your opt...
xboot/libxnes
7,092
documents/test-roms/spritecans-2011/src/sound.s
; sound.s ; part of sound engine for LJ65 ;;; Copyright (C) 2009-2011 Damian Yerrick ; ; This program is free software; you can redistribute it and/or ; modify it under the terms of the GNU General Public License ; as published by the Free Software Foundation; either version 3 ; of the License, or (at your opt...
xboot/libxnes
6,300
documents/test-roms/spritecans-2011/src/musicseq.s
; ; Music sequence data for Sprite Cans Demo ; Copyright 2010 Damian Yerrick ; Copyright 1984 Ray Lynch ; ; To the extent permitted by law, copying and distribution of this ; file, with or without modification, are permitted in any medium ; without royalty provided the copyright notice and this notice are ; preserved i...
xboot/libxnes
1,282
documents/test-roms/instr_test-v3/source/01-implied.s
.include "instr_test.inc" instrs: entry $2A,"ROL A" ; A = op A entry $0A,"ASL A" entry $6A,"ROR A" entry $4A,"LSR A" entry $8A,"TXA" ; AXY = AXY entry $98,"TYA" entry $AA,"TAX" entry $A8,"TAY" entry $E8,"INX" ; XY = op XY entry $C8,"INY" entry $CA,"DEX" entry $88,"DEY" entry $38,"SEC" ; flags = op fl...
xboot/libxnes
2,384
documents/test-roms/instr_test-v3/source/06-abs_xy.s
.include "instr_test.inc" instrs: entry $BD,"LDA a,X" ; AXY = a,XY entry $B9,"LDA a,Y" entry $BC,"LDY a,X" entry $BE,"LDX a,Y" entry $9D,"STA a,X" ; a,XY = A entry $99,"STA a,Y" entry $FE,"INC a,X" ; a,XY = op a,XY entry $DE,"DEC a,X" entry $1E,"ASL a,X" entry $5E,"LSR a,X" entry $3E,"ROL a,X" entry $7...
xboot/libxnes
1,538
documents/test-roms/instr_test-v3/source/07-ind_x.s
.include "instr_test.inc" instrs: entry $A1,"LDA (z,X)" ; A = (z,X) entry $81,"STA (z,X)" ; (z,X) = A entry $C1,"CMP (z,X)" ; A op (z,X) entry $61,"ADC (z,X)" ; A = A op (z,X) entry $E1,"SBC (z,X)" entry $01,"ORA (z,X)" entry $21,"AND (z,X)" entry $41,"EOR (z,X)" .ifndef OFFICIAL_ONLY entry $03,"SLO (z,...
xboot/libxnes
1,497
documents/test-roms/instr_test-v3/source/05-absolute.s
.include "instr_test.inc" instrs: entry $AD,"LDA a" ; AXY = a entry $AE,"LDX a" entry $AC,"LDY a" entry $8D,"STA a" ; a = AXY entry $8E,"STX a" entry $8C,"STY a" entry $EE,"INC a" ; a = op a entry $CE,"DEC a" entry $0E,"ASL a" entry $4E,"LSR a" entry $2E,"ROL a" entry $6E,"ROR a" entry $6D,"ADC a" ;...
xboot/libxnes
1,552
documents/test-roms/instr_test-v3/source/03-zero_page.s
.include "instr_test.inc" instrs: entry $A5,"LDA z" ; AXY = z entry $A6,"LDX z" entry $A4,"LDY z" entry $85,"STA z" ; z = AXY entry $86,"STX z" entry $84,"STY z" entry $E6,"INC z" ; z = op z entry $C6,"DEC z" entry $06,"ASL z" entry $46,"LSR z" entry $26,"ROL z" entry $66,"ROR z" entry $65,"ADC z" ;...
xboot/libxnes
1,313
documents/test-roms/instr_test-v3/source/08-ind_y.s
.include "instr_test.inc" instrs: entry $B1,"LDA (z),Y" ; A = (z),Y entry $91,"STA (z),Y" ; (z),Y = A entry $D1,"CMP (z),Y" ; A op (z),Y entry $11,"ORA (z),Y" ; A = A op (z),Y entry $F1,"SBC (z),Y" entry $71,"ADC (z),Y" entry $31,"AND (z),Y" entry $51,"EOR (z),Y" .ifndef OFFICIAL_ONLY entry $13,"SLO (z)...
xboot/libxnes
1,128
documents/test-roms/instr_test-v3/source/15-special.s
CUSTOM_IRQ=1 .include "shell.inc" irq: pla pha rti jmp_6ff: .byte $6C ; JMP ($6FF) (to avoid warning) .word $6FF main: setb SNDMODE,$40 ; disable frame IRQ set_test 3,"JMP ($6FF) should get high byte from $600" setb $6FF,$F0 setb $600,$07 setb $700,$06 setb $7F0,$E8 ; INX setb $7F1,$60 ; RTS setb $6...
xboot/libxnes
1,228
documents/test-roms/instr_test-v3/source/02-immediate.s
.include "instr_test.inc" instrs: entry $A9,"LDA #n" ; AXY = #n entry $A2,"LDX #n" entry $A0,"LDY #n" entry $69,"ADC #n" ; A = A op #n entry $E9,"SBC #n" entry $09,"ORA #n" entry $29,"AND #n" entry $49,"EOR #n" entry $C9,"CMP #n" ; AXY op #n entry $E0,"CPX #n" entry $C0,"CPY #n" .ifndef OFFICIAL_ONLY e...
xboot/libxnes
1,350
documents/test-roms/instr_test-v3/source/10-stack.s
.include "instr_test.inc" instrs: entry $48,"PHA" entry $08,"PHP" entry $68,"PLA" entry $28,"PLP" entry $9A,"TXS" entry $BA,"TSX" instrs_size = * - instrs instr_template: pha jmp instr_done instr_template_size = * - instr_template values2: .byte 0,$FF,$01,$02,$04,$08,$10,$20,$40,$80 values2_size = * - v...
xboot/libxnes
1,873
documents/test-roms/instr_test-v3/source/04-zp_xy.s
.include "instr_test.inc" instrs: entry $B5,"LDA z,X" ; AXY = z,XY entry $B4,"LDY z,X" entry $B6,"LDX z,Y" entry $95,"STA z,X" ; z,XY = AXY entry $94,"STY z,X" entry $96,"STX z,Y" entry $F6,"INC z,X" ; z,XY = op z,XY entry $D6,"DEC z,X" entry $16,"ASL z,X" entry $56,"LSR z,X" entry $36,"ROL z,X" entry ...
xboot/libxnes
1,875
documents/test-roms/instr_test-v3/source/common/testing.s
; Utilities for writing test ROMs ; In NVRAM so these can be used before initializing runtime, ; then runtime initialized without clearing them nv_res test_code ; code of current test nv_res test_name,2 ; address of name of current test, or 0 of none ; Sets current test code and optional name. Also resets ; checksum...
xboot/libxnes
3,234
documents/test-roms/instr_test-v3/source/common/print.s
; Prints values in various ways to output, ; including numbers and strings. newline = 10 zp_byte print_temp_ ; Prints indicated register to console as two hex ; chars and space ; Preserved: A, X, Y, flags print_a: php pha print_reg_: jsr print_hex lda #' ' jsr print_char_ pla plp rts print_x: php pha txa...
xboot/libxnes
5,224
documents/test-roms/instr_test-v3/source/common/crc_fast.s
; Fast table-based CRC-32 ; Initializes fast CRC tables and resets checksum. ; Preserved: Y init_crc_fast = reset_crc ; Updates checksum with byte from A ; Preserved: X, Y ; Time: 54 clocks update_crc_fast: stx checksum_temp ; Updates checksum with byte from A ; Preserved: Y ; Time: 42 clocks .macro update_crc_fast...
xboot/libxnes
3,456
documents/test-roms/instr_test-v3/source/common/shell_misc.s
; Reports internal error and exits program internal_error: assert_failed: pla tay pla init_cpu_regs print_str newline,"internal error, PC=" jsr print_hex jsr print_y lda #255 jmp exit .import __NVRAM_LOAD__, __NVRAM_SIZE__ .macro fill_ram_ Begin, End ; Simpler to count from negative size up to 0, ; and adj...
xboot/libxnes
2,088
documents/test-roms/instr_test-v3/source/common/build_rom.s
; Builds program as iNES ROM ; Default is 32K PRG and 8K CHR ROM, NROM (0) ; CHR_RAM selects UNROM (2) ; CART_WRAM selects MMC1 (1) .if 0 ; Options to set before .include "shell.inc": CHR_RAM = 1 ; Use CHR-RAM instead of CHR-ROM CART_WRAM = 1 ; Use mapper that supports 8K WRAM in cart MAPPER = n ; Specify ...
xboot/libxnes
5,438
documents/test-roms/instr_test-v3/source/common/console.s
; Scrolling text console with word wrapping, 30x29 characters. ; ; * Defers PPU initialization until first flush/ newline. ; * Works even if PPU doesn't support scrolling. ; * Keeps border around edge of screen for TV overscan. ; * Requires vertical or single-screen mirroring. ; * Requires ASCII font in CHR. .ifndef C...
xboot/libxnes
1,096
documents/test-roms/instr_test-v3/source/common/text_out.s
; Text output as expanding zero-terminated string at text_out_base ; The final exit result byte is written here final_result = $6000 ; Text output is written here as an expanding ; zero-terminated string text_out_base = $6004 bss_res text_out_temp zp_res text_out_addr,2 init_text_out: ldx #0 ; Put valid data fi...
xboot/libxnes
3,100
documents/test-roms/instr_test-v3/source/common/ppu.s
; PPU utilities bss_res ppu_not_present ; Sets PPUADDR to w ; Preserved: X, Y .macro set_ppuaddr w bit PPUSTATUS setb PPUADDR,>w setb PPUADDR,<w .endmacro ; Delays by no more than n scanlines .macro delay_scanlines n .if CLOCK_RATE <> 1789773 .error "Currently only supports NTSC" .endif delay ((n)*341)/3 .e...
xboot/libxnes
2,752
documents/test-roms/instr_test-v3/source/common/shell.s
; Shell that sets up testing framework and calls main ; Detect inclusion loops (otherwise ca65 goes crazy) .ifdef SHELL_INCLUDED .error "shell.s included twice" .end .endif SHELL_INCLUDED = 1 ; Temporary variables that ANY routine might modify, so ; only use them between routine calls. temp = <$A temp2 = <$B tem...
xboot/libxnes
3,734
documents/test-roms/instr_test-v3/source/common/delay.s
; Delays in CPU clocks, milliseconds, etc. All routines are re-entrant ; (no global data). No routines touch X or Y during execution. ; Code generated by macros is relocatable; it contains no JMPs to itself. zp_res delay_temp_ ; only written to ; Delays n clocks, from 2 to 16777215 ; Preserved: A, X, Y, flags .macro ...
xboot/libxnes
2,410
documents/test-roms/instr_test-v3/source/common/instr_test_end.s
; Offset of current instruction zp_byte instrs_idx zp_byte failed_count main: ; Stack slightly lower than top ldx #$A2 txs jsr init_crc_fast ; Test each instruction lda #0 @loop: sta instrs_idx tay jsr reset_crc lda instrs,y jsr test_instr jsr check_result lda instrs_idx clc adc #4 cmp #instrs...
xboot/libxnes
1,600
documents/test-roms/instr_test-v3/source/common/crc.s
; CRC-32 checksum calculation zp_res checksum,4 ; Current CRC-32; no need to invert zp_byte checksum_temp zp_byte checksum_off_ ; Turns CRC updating on/off. Allows nesting. ; Preserved: A, X, Y crc_off: dec checksum_off_ rts crc_on: inc checksum_off_ beq :+ jpl internal_error ; catch unbalanced crc calls :...
xboot/libxnes
2,037
documents/test-roms/instr_misc/source/03-dummy_reads.s
; Tests some instructions that do dummy reads before the real read/write. ; Doesn't test all instructions. ; ; Tests LDA and STA with modes (ZP,X), (ZP),Y and ABS,X ; Dummy reads for the following cases are tested: ; ; LDA ABS,X or (ZP),Y when carry is generated from low byte ; STA ABS,X or (ZP),Y ; ROL ABS,X always ....
xboot/libxnes
1,931
documents/test-roms/instr_misc/source/04-dummy_reads_apu.s
; Tests dummy reads for (hopefully) ALL instructions which do them, ; including unofficial ones. Prints opcode(s) of failed ; instructions. Requires that APU implement $4015 IRQ flag reading. .include "shell.inc" zp_byte opcode zp_byte errors begin: setb SNDMODE,0 lda SNDCHN delay 30000 setw addr,SNDCHN+3 rts ...
xboot/libxnes
1,856
documents/test-roms/instr_misc/source/common/testing.s
; Utilities for writing test ROMs ; In NVRAM so these can be used before initializing runtime, ; then runtime initialized without clearing them nv_res test_code ; code of current test nv_res test_name,2 ; address of name of current test, or 0 of none ; Sets current test code and optional name. Also resets ; checksum...
xboot/libxnes
2,660
documents/test-roms/instr_misc/source/common/print.s
; Prints values in various ways to output, ; including numbers and strings. newline = 10 zp_byte print_temp_ ; Prints indicated register to console as two hex ; chars and space ; Preserved: A, X, Y, flags print_a: php pha print_reg_: jsr print_hex lda #' ' jsr print_char_ pla plp rts print_x: php pha txa...
xboot/libxnes
1,491
documents/test-roms/instr_misc/source/common/build_rom.s
; Builds program as iNES ROM ; Default is 16K PRG and 8K CHR ROM, NROM (0) .if 0 ; Options to set before .include "shell.inc": CHR_RAM=1 ; Use CHR-RAM instead of CHR-ROM CART_WRAM=1 ; Use mapper that supports 8K WRAM in cart CUSTOM_MAPPER=n ; Specify mapper number .endif .ifndef CUSTOM_MAPPER .ifdef CART_...
xboot/libxnes
5,523
documents/test-roms/instr_misc/source/common/console.s
; Scrolling text console with line wrapping, 30x29 characters. ; Buffers lines for speed. Will work even if PPU doesn't ; support scrolling (until text reaches bottom). Keeps border ; along bottom in case TV cuts it off. ; ; Defers most initialization until first newline, at which ; point it clears nametable and makes ...
xboot/libxnes
1,096
documents/test-roms/instr_misc/source/common/text_out.s
; Text output as expanding zero-terminated string at text_out_base ; The final exit result byte is written here final_result = $6000 ; Text output is written here as an expanding ; zero-terminated string text_out_base = $6004 bss_res text_out_temp zp_res text_out_addr,2 init_text_out: ldx #0 ; Put valid data fi...
xboot/libxnes
2,024
documents/test-roms/instr_misc/source/common/ppu.s
; PPU utilities bss_res ppu_not_present ; Sets PPUADDR to w ; Preserved: X, Y .macro set_ppuaddr w bit PPUSTATUS setb PPUADDR,>w setb PPUADDR,<w .endmacro ; Delays by no more than n scanlines .macro delay_scanlines n .if CLOCK_RATE <> 1789773 .error "Currently only supports NTSC" .endif delay ((n)*341)/3 .e...
xboot/libxnes
4,658
documents/test-roms/instr_misc/source/common/shell.s
; Common routines and runtime ; Detect inclusion loops (otherwise ca65 goes crazy) .ifdef SHELL_INCLUDED .error "shell.s included twice" .end .endif SHELL_INCLUDED = 1 ;**** Special globals **** ; Temporary variables that ANY routine might modify, so ; only use them between routine calls. temp = <$A temp2 = <$B...
xboot/libxnes
3,437
documents/test-roms/instr_misc/source/common/delay.s
; Delays in CPU clocks, milliseconds, etc. All routines are re-entrant ; (no global data). No routines touch X or Y during execution. ; Code generated by macros is relocatable; it contains no JMPs to itself. zp_byte delay_temp_ ; only written to ; Delays n clocks, from 2 to 16777215 ; Preserved: A, X, Y, flags .macro...
xboot/libxnes
1,632
documents/test-roms/instr_misc/source/common/crc.s
; CRC-32 checksum calculation zp_res checksum,4 zp_byte checksum_temp zp_byte checksum_off_ ; Turns CRC updating on/off. Allows nesting. ; Preserved: A, X, Y crc_off: dec checksum_off_ rts crc_on: inc checksum_off_ beq :+ jpl internal_error ; catch unbalanced crc calls : rts ; Initializes checksum modul...
xboot/libxnes
16,115
documents/test-roms/cpu_dummy_writes/source/cpu_dummy_writes_oam.s
; All read-modify-write-instructions on 6502 have a particular glitch: ; They first write back the unmodified value; then, the modified value. ; This test uses the PPU OAM write ($2004) autoincrement feature to ; verify that the CPU does that. ; ; Expected output: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; TEST: cpu_d...
xboot/libxnes
23,304
documents/test-roms/cpu_dummy_writes/source/cpu_dummy_writes_ppumem.s
; All read-modify-write-instructions on 6502 have a particular glitch: ; They first write back the unmodified value; then, the modified value. ; ; This test requires that the PPU open bus behavior is accurately emulated. ; Cycle accuracy will not be tested. ; ; ; Expected output: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
xboot/libxnes
1,856
documents/test-roms/cpu_dummy_writes/source/common/testing.s
; Utilities for writing test ROMs ; In NVRAM so these can be used before initializing runtime, ; then runtime initialized without clearing them nv_res test_code ; code of current test nv_res test_name,2 ; address of name of current test, or 0 of none ; Sets current test code and optional name. Also resets ; checksum...
xboot/libxnes
5,870
documents/test-roms/cpu_dummy_writes/source/common/print.s
; Prints values in various ways to output, ; including numbers and strings. newline = 10 zp_byte print_temp_ ; Prints indicated register to console as two hex ; chars and space ; Preserved: A, X, Y, flags print_a: php pha print_reg_: jsr print_hex lda #' ' jsr print_char_ pla plp rts print_x: php pha txa...
xboot/libxnes
1,591
documents/test-roms/cpu_dummy_writes/source/common/build_rom.s
; Builds program as iNES ROM ; Default is 16K PRG and 8K CHR ROM, NROM (0) .if 0 ; Options to set before .include "shell.inc": CHR_RAM=1 ; Use CHR-RAM instead of CHR-ROM CART_WRAM=1 ; Use mapper that supports 8K WRAM in cart CUSTOM_MAPPER=n ; Specify mapper number .endif .ifndef CUSTOM_MAPPER .ifdef CART_...
xboot/libxnes
4,296
documents/test-roms/cpu_dummy_writes/source/common/console.s
; Scrolling text console with line wrapping, 30x29 characters. ; Buffers lines for speed. Will work even if PPU doesn't ; support scrolling (until text reaches bottom). Keeps border ; along bottom in case TV cuts it off. ; ; Defers most initialization until first newline, at which ; point it clears nametable and makes ...
xboot/libxnes
1,096
documents/test-roms/cpu_dummy_writes/source/common/text_out.s
; Text output as expanding zero-terminated string at text_out_base ; The final exit result byte is written here final_result = $6000 ; Text output is written here as an expanding ; zero-terminated string text_out_base = $6004 bss_res text_out_temp zp_res text_out_addr,2 init_text_out: ldx #0 ; Put valid data fi...
xboot/libxnes
2,024
documents/test-roms/cpu_dummy_writes/source/common/ppu.s
; PPU utilities bss_res ppu_not_present ; Sets PPUADDR to w ; Preserved: X, Y .macro set_ppuaddr w bit PPUSTATUS setb PPUADDR,>w setb PPUADDR,<w .endmacro ; Delays by no more than n scanlines .macro delay_scanlines n .if CLOCK_RATE <> 1789773 .error "Currently only supports NTSC" .endif delay ((n)*341)/3 .e...
xboot/libxnes
4,658
documents/test-roms/cpu_dummy_writes/source/common/shell.s
; Common routines and runtime ; Detect inclusion loops (otherwise ca65 goes crazy) .ifdef SHELL_INCLUDED .error "shell.s included twice" .end .endif SHELL_INCLUDED = 1 ;**** Special globals **** ; Temporary variables that ANY routine might modify, so ; only use them between routine calls. temp = <$A temp2 = <$B...
xboot/libxnes
4,822
documents/test-roms/cpu_dummy_writes/source/common/delay.s
; Delays in CPU clocks, milliseconds, etc. All routines are re-entrant ; (no global data). No routines touch X or Y during execution. ; Code generated by macros is relocatable; it contains no JMPs to itself. zp_byte delay_temp_ ; only written to ; Delays n clocks, from 2 to 16777215 ; Preserved: A, X, Y, flags .macro...
xboot/libxnes
1,632
documents/test-roms/cpu_dummy_writes/source/common/crc.s
; CRC-32 checksum calculation zp_res checksum,4 zp_byte checksum_temp zp_byte checksum_off_ ; Turns CRC updating on/off. Allows nesting. ; Preserved: A, X, Y crc_off: dec checksum_off_ rts crc_on: inc checksum_off_ beq :+ jpl internal_error ; catch unbalanced crc calls : rts ; Initializes checksum modul...
XboxDev/cromwell
12,133
boot/BootStartup.S
/* * * BIOS ROM Startup Assembler */ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Pub...
XboxDev/cromwell
9,409
boot_rom/2bBootStartup.S
/* * * BIOS ROM Startup Assembler * (C)2002 Andy, Michael, Paul, Steve * Original top and bottom ROM code by Steve from an idea by Michael * -- NOTE: Comment removed, the top / bottom Code changed to turnaround code. */ /*************************************************************************** * ...
XboxDev/cromwell
10,561
boot_xbe/xbe.S
#define BASE_ADDRESS 0x10000 #define FILE_SIZE (0x4000+0x40000) header_start: .ascii "XBEH" // digital signature .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .long BASE_ADDRESS // ...
XboxDev/cromwell
26,002
boot_xbe/font.S
// This 256 character 8x16 VGA font (IBM codepage 437) was taken from // /usr/lib/kbd/consolefonts/default8x16.psf.gz in Linux Mandrake 8.2 font: .byte 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 .byte 0x00, 0x00, 0x7E, 0x81, 0xA5, 0x81, 0x81, 0xBD, 0x99, 0x81, 0x81, 0...
XboxDev/cromwell
13,330
boot_xbe/xbeboot.S
// Xbox Linux XBE Bootloader // // Copyright (C) 2002 Michael Steil & anonymous // // This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by the // Free Software Foundation; either version 2 of the License, or (at your // option) any...