diff --git a/Project/Src/NES/6502_gcc.S b/Project/Src/NES/6502_gcc.S index 956b9ca..a238c82 100644 --- a/Project/Src/NES/6502_gcc.S +++ b/Project/Src/NES/6502_gcc.S @@ -29,7 +29,7 @@ .equ NMI_VECTOR, 0xfffa // NMI中断向量地址 -.section .text +.section .text._6502_cpu @@ -46,7 +46,7 @@ _00: bl VecCont fetch 7 - @ LTORG // 把常量放在这里 + .ltorg // 把常量放在这里 // ---------------------------------------------------------------------------- @@ -1247,11 +1247,13 @@ IO_R: // I/O read b empty_R // 读地址不正确 +.type io_read_tbl, %object io_read_tbl: .word apu_4015R // void_4015r ;4015 (sound) .word joy0_R // 4016: controller 1 .word joy1_R // 4017: controller 2 + IO_W: // I/O write mov r2,#0x4018 // $4018-$6000 cmp r12,r2 @@ -1265,6 +1267,7 @@ IO_W: // I/O write b empty_R // 读地址不正确 +.type io_write_tbl, %object io_write_tbl: .word apu_w // void_4000w .word apu_w // _4001w @@ -1449,6 +1452,7 @@ PPU_R: bx lr +.type op_table, %object op_table: .word _00,_01,_xx,_03,_xx,_05,_06,_07,_08,_09,_0A,_xx,_xx,_0D,_0E,_xx .word _10,_11,_xx,_xx,_14,_15,_16,_xx,_18,_19,_xx,_xx,_xx,_1D,_1E,_xx @@ -1468,7 +1472,7 @@ op_table: .word _F0,_F1,_xx,_xx,_xx,_F5,_F6,_xx,_F8,_F9,_xx,_FB,_xx,_FD,_FE,_FF -.section .data +.section .data._6502_cpu_data .type cpu_data, %object cpu_data: .word 0 // opz # 4 代码表地址