├── bankA_.inc ├── copyrights.txt ├── nas ├── dasm ├── dasm.exe ├── dasm_old.exe ├── nesimage.exe ├── m3checksum.exe ├── chr.nas ├── hdr.nas ├── bank0.nas ├── bank1.nas ├── bank2.nas ├── bank3.nas ├── bank4.nas ├── bank5.nas ├── bank6.nas ├── bank7.nas ├── bank8.nas ├── bank9.nas ├── bankA.nas ├── bankB.nas ├── bankC.nas ├── bankD.nas ├── bankE.nas └── bankF.nas ├── chr └── !simcity.chr ├── backup.bat ├── make.bat ├── ram.inc ├── bank6.inc ├── macroses.inc ├── bankE.inc └── doc └── notes.txt /bankA_.inc: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /copyrights.txt: -------------------------------------------------------------------------------- 1 | (C) 2017-2018 CAH4E3 BFS EDITION 2 | -------------------------------------------------------------------------------- /nas/dasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g0me3/bfs_nes_sims/HEAD/nas/dasm -------------------------------------------------------------------------------- /nas/dasm.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g0me3/bfs_nes_sims/HEAD/nas/dasm.exe -------------------------------------------------------------------------------- /chr/!simcity.chr: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g0me3/bfs_nes_sims/HEAD/chr/!simcity.chr -------------------------------------------------------------------------------- /nas/dasm_old.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g0me3/bfs_nes_sims/HEAD/nas/dasm_old.exe -------------------------------------------------------------------------------- /nas/nesimage.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g0me3/bfs_nes_sims/HEAD/nas/nesimage.exe -------------------------------------------------------------------------------- /nas/m3checksum.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/g0me3/bfs_nes_sims/HEAD/nas/m3checksum.exe -------------------------------------------------------------------------------- /nas/chr.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | ORG $0000 4 | 5 | INCLUDE "../macroses.inc" 6 | 7 | INCBIN "../chr/!simcity.chr" 8 | -------------------------------------------------------------------------------- /nas/hdr.nas: -------------------------------------------------------------------------------- 1 | PROCESSOR 6502 2 | 3 | ORG $0000 4 | 5 | .BYTE "NES", $1A 6 | .BYTE $08 ; prg 16k banks 7 | .BYTE $10 ; chr 8k banks 8 | .BYTE $53 ; mapper lo / battery / mirror 9 | .BYTE $00 ; mapper hi 10 | .BYTE 0, 0, 0, 0, 0, 0, 0, 0 -------------------------------------------------------------------------------- /backup.bat: -------------------------------------------------------------------------------- 1 | mkdir .\backup\current 2 | mkdir .\backup\current\nas 3 | mkdir .\backup\current\chr 4 | mkdir .\backup\current\doc 5 | rem mkdir .\backup\current\tlm 6 | 7 | copy /b *.bat .\backup\current\*.bat 8 | copy /b *.inc .\backup\current\*.inc 9 | copy /b nas\*.exe .\backup\current\nas\*.exe 10 | copy /b nas\*.nas .\backup\current\nas\*.nas 11 | copy /b chr\*.chr .\backup\current\chr\*.chr 12 | copy /b doc\*.txt .\backup\current\doc\*.txt 13 | rem copy /b tlm\*.* .\backup\current\tlm\*.* 14 | copy /b *.txt .\backup\current\*.txt 15 | -------------------------------------------------------------------------------- /nas/bank0.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bank1.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bank2.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bank3.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bank4.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bank5.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bank6.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bank7.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bank8.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bank9.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bankA.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bankB.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bankC.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bankD.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bankE.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG.u BANKF 53 | INCLUDE "../bankF.inc" 54 | -------------------------------------------------------------------------------- /nas/bankF.nas: -------------------------------------------------------------------------------- 1 | 2 | PROCESSOR 6502 3 | 4 | SEG.u RAM 5 | INCLUDE "../ram.inc" 6 | 7 | SEG.u BANK0 8 | INCLUDE "../bank0.inc" 9 | 10 | SEG.u BANK1 11 | INCLUDE "../bank1.inc" 12 | 13 | SEG.u BANK2 14 | INCLUDE "../bank2.inc" 15 | 16 | SEG.u BANK3 17 | INCLUDE "../bank3.inc" 18 | 19 | SEG.u BANK4 20 | INCLUDE "../bank4.inc" 21 | 22 | SEG.u BANK5 23 | INCLUDE "../bank5.inc" 24 | 25 | SEG.u BANK6 26 | INCLUDE "../bank6.inc" 27 | 28 | SEG.u BANK7 29 | INCLUDE "../bank7.inc" 30 | 31 | SEG.u BANK8 32 | INCLUDE "../bank8.inc" 33 | 34 | SEG.u BANK9 35 | INCLUDE "../bank9.inc" 36 | 37 | SEG.u BANKA 38 | INCLUDE "../bankA.inc" 39 | 40 | SEG.u BANKB 41 | INCLUDE "../bankB.inc" 42 | 43 | SEG.u BANKC 44 | INCLUDE "../bankC.inc" 45 | 46 | SEG.u BANKD 47 | INCLUDE "../bankD.inc" 48 | 49 | SEG.u BANKE 50 | INCLUDE "../bankE.inc" 51 | 52 | SEG BANKF 53 | INCLUDE "../bankF.inc" 54 | 55 | -------------------------------------------------------------------------------- /make.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | start ..\..\..\tools\textpad\TextPad.exe doc\notes.txt ram.inc macroses.inc bankF.inc bankE.inc bankD.inc bankC.inc bankB.inc bankA.inc bank9.inc bank7.inc bank6.inc bank5.inc bank4.inc bank3.inc bank2.inc bank1.inc bank0.inc 4 | 5 | pause 0 6 | 7 | :again 8 | 9 | del !simprev.nes 10 | rename !simcity.nes !simprev.nes 11 | 12 | cd nas 13 | 14 | echo assemble... 15 | 16 | dasm bank0.nas -f3 -obank0.bin 17 | dasm bank0.nas -f3 -l!simcity.lst -obank0.bin > !err.log 18 | 19 | for %%f in (*.nas) do call :dodasm %%f > NUL 20 | 21 | goto :build 22 | 23 | :dodasm 24 | dasm %1 -f3 -o%~n1.bin 25 | goto :eof 26 | 27 | :build 28 | echo build... 29 | 30 | rename hdr.bin !simcity.hdr > NUL 31 | rename chr.bin !simcity.chr > NUL 32 | 33 | copy /b bank0.bin+bank1.bin+bank2.bin+bank3.bin+bank4.bin+bank5.bin+bank6.bin+bank7.bin tmp0.bin > NUL 34 | copy /b bank8.bin+bank9.bin+bankA.bin+bankB.bin+bankC.bin+bankD.bin+bankE.bin+bankF.bin tmp1.bin > NUL 35 | copy /b tmp0.bin+tmp1.bin !simcity.prg > NUL 36 | 37 | nesimage j !simcity > NUL 38 | 39 | echo cleanup... 40 | 41 | for %%f in (*.bin) do del %%f 42 | rem del !err.log 43 | del !simcity.prg 44 | del !simcity.chr 45 | del !simcity.hdr 46 | 47 | copy /b !simcity.nes ..\!simcity.nes > NUL 48 | 49 | del !simcity.nes 50 | 51 | cd .. 52 | 53 | echo ===OLD ROM=== 54 | if exist !simprev.nes nas\m3checksum !simprev.nes 55 | echo ===NEW ROM=== 56 | if exist !simcity.nes nas\m3checksum !simcity.nes 57 | 58 | echo done. 59 | pause 0 60 | 61 | goto :again 62 | 63 | :eof 64 | -------------------------------------------------------------------------------- /ram.inc: -------------------------------------------------------------------------------- 1 | 2 | INCLUDE "../macroses.inc" 3 | 4 | ;--------------------R-A-M---------------------- 5 | 6 | ORG $0000 7 | 8 | _ptr0: 9 | .WORD 0 10 | _tmp0 EQU _ptr0 11 | _tmp1 EQU _tmp0+1 12 | 13 | _ptr2: 14 | .WORD 0 15 | _tmp2: EQU _ptr2 16 | _tmp3: EQU _tmp2+1 17 | 18 | _ptr4: 19 | .WORD 0 20 | _tmp4 EQU _ptr4 21 | _tmp5 EQU _tmp4+1 22 | 23 | _ptr6: 24 | .WORD 0 25 | _tmp6 EQU _ptr6 26 | _tmp7 EQU _tmp6+1 27 | 28 | ; variables never used in the original code, hovewer, tmp9 is 29 | ; reinitialized with 0 at the reset for unknown reason 30 | ; 31 | ; will use these regs for my own if i need some spare vars 32 | ; to be sure they doesn't interfer with anything. 33 | ; 34 | _tmp8: 35 | .BYTE 0 36 | _tmp9: 37 | .BYTE 0 38 | 39 | _ppu_ctrl_shadow: 40 | .BYTE 0 41 | _ppu_mask_shadow: 42 | .BYTE 0 43 | _spr_buf_pos: 44 | .BYTE 0 45 | _ppu_queue_pos_tail: 46 | .BYTE 0 47 | _ppu_queue_pos_head: 48 | .BYTE 0 49 | _extnt_queue_pos_tail: 50 | .BYTE 0 51 | _extnt_queue_pos_head: 52 | .BYTE 0 53 | _nmi_busy_flag: 54 | .BYTE 0 55 | _nmi_flag: 56 | .BYTE 0 57 | ;byte_13_unused: 58 | ; .BYTE 0 59 | _irq_sub_idx: 60 | .BYTE 0 61 | _ptr15: 62 | .WORD 0 63 | _tmp17: 64 | .BYTE 0 65 | _ptr18: 66 | .WORD 0 67 | _mmc5_operation_in_progress_flag: 68 | .BYTE 0 69 | _frames_counter: 70 | .BYTE 0 71 | _frames_div8_counter: 72 | .BYTE 0 73 | _rand_seed: 74 | .BYTE 0,0,0 75 | _mmc5_sp_mode_shadow: 76 | .BYTE 0 77 | _mmc5_sp_scroll_shadow: 78 | .BYTE 0 79 | _mmc5_chr_mode_shadow: 80 | .BYTE 0 81 | ;_unref_18: 82 | ; .BYTE 0,0,0,0 83 | _cur_thread_idx: 84 | .BYTE 0 85 | _thread_stack: 86 | .BYTE 0,0 87 | _thread_prg8000: 88 | .BYTE 0,0 89 | _thread_prgA000: 90 | .BYTE 0,0 91 | _thread_sram_state: 92 | .BYTE 0,0 93 | _prg_prg8000_shadow: 94 | .BYTE 0 95 | _prg_prgA000_shadow: 96 | .BYTE 0 97 | _sram_state_flag: 98 | .BYTE 0 99 | _disasters_flags: 100 | .BYTE 0 101 | _cur_building_price: 102 | .BYTE 0,0 103 | _hud_money_redraw_req: 104 | .BYTE 0 105 | ;byte_37: 106 | ; .BYTE 0 ; REDUNDANT, unused var 107 | _game_state_idx: 108 | .BYTE 0 109 | _hud_redraw_req: 110 | .BYTE 0 111 | _constr_palette_redraw_req: 112 | .BYTE 0 113 | ;byte_3B: 114 | ; .BYTE 0 ; another REDUNDANT var 115 | _gui_active_controls_flags: 116 | .BYTE 0 117 | 118 | _tpos _cur_screen_tile 119 | 120 | ; .BYTE 0 ; unused var 121 | 122 | _scr_mode_idx: 123 | .BYTE 0 124 | _pad_tmp: 125 | .BYTE 0 126 | _pad0_held: 127 | .BYTE 0 128 | _pad0_press: 129 | .BYTE 0 130 | _pad0_autorep: 131 | .BYTE 0 132 | _pad0_autorep_timer: 133 | .BYTE 0 134 | _dpad0_autorep_timer: 135 | .BYTE 0 136 | _pad0_prev_held: 137 | .BYTE 0 138 | _pad1_prev_held: 139 | .BYTE 0 140 | 141 | _tsprarg _spr_insert_args 142 | 143 | _tsprargraw _spr_insert_raw_args 144 | 145 | _tpos _cur_map_wnd_pos 146 | 147 | _full_game_field_redraw_req: 148 | .BYTE 0 149 | _update_rect_left: 150 | .BYTE 0 151 | _update_rect_right: 152 | .BYTE 0 153 | _update_rect_top: 154 | .BYTE 0 155 | _update_rect_bottom: 156 | .BYTE 0 157 | byte_58: 158 | .BYTE 0 159 | byte_59: 160 | .BYTE 0 161 | 162 | _tpos _tmp_tile_pos 163 | 164 | _build_game_field_update_req: 165 | .BYTE 0 166 | _full_game_field_redraw_req_tmp: 167 | .BYTE 0 168 | _update_rect_left_tmp: 169 | .BYTE 0 170 | _update_rect_right_tmp: 171 | .BYTE 0 172 | _update_rect_top_tmp: 173 | .BYTE 0 174 | _update_rect_bottom_tmp: 175 | .BYTE 0 176 | byte_62: 177 | .BYTE 0 178 | byte_63: 179 | .BYTE 0 180 | byte_64: 181 | .BYTE 0 182 | byte_65: 183 | .BYTE 0 184 | byte_66: 185 | .BYTE 0 186 | byte_67: 187 | .BYTE 0 188 | byte_68: 189 | .BYTE 0 190 | byte_69: 191 | .BYTE 0 192 | byte_6A: 193 | .BYTE 0 194 | byte_6B: 195 | .BYTE 0 196 | word_6C: 197 | .BYTE 0,0 198 | _tmp6E: 199 | .BYTE 0,0 200 | 201 | _tmp70: 202 | _anim_pos_is_load: 203 | .BYTE 0 204 | byte_71: 205 | _tmp71: 206 | .BYTE 0 207 | _anim_pos_col: 208 | _tmp72: 209 | .BYTE 0 210 | byte_73: 211 | _tmp73: 212 | .BYTE 0 213 | _anim_pos_row: 214 | _tmp74: 215 | .BYTE 0 216 | byte_75: 217 | _tmp75: 218 | .BYTE 0 219 | byte_76: 220 | _tmp76: 221 | .BYTE 0 222 | byte_77: 223 | _tmp77: 224 | .BYTE 0 225 | byte_78: 226 | _tmp78: 227 | .BYTE 0 228 | byte_79: 229 | _tmp79: 230 | .BYTE 0 231 | byte_7A: 232 | _tmp7A: 233 | .BYTE 0 234 | byte_7B: 235 | _tmp7B: 236 | .BYTE 0 237 | byte_7C: 238 | _tmp7C: 239 | .BYTE 0 240 | byte_7D: 241 | _tmp7D: 242 | .BYTE 0 243 | byte_7E: 244 | _tmp7E: 245 | .BYTE 0 246 | byte_7F: 247 | _tmp7F: 248 | .BYTE 0 249 | byte_80: 250 | _tmp80: 251 | .BYTE 0 252 | byte_81: 253 | _tmp81: 254 | .BYTE 0 255 | byte_82: 256 | _tmp82: 257 | .BYTE 0 258 | byte_83: 259 | _tmp83: 260 | .BYTE 0 261 | _mmc5_prgA000_bank_tmp: 262 | .BYTE 0 263 | _wnd_draw_cnt: 264 | .BYTE 0 265 | _wnd_erase_cnt: 266 | .BYTE 0 267 | _wnd_ppu_data_backup_req: 268 | .BYTE 0 269 | _gui_ctrl_menu_press_idx: 270 | .BYTE 0 271 | _wnd_lvl_idx: 272 | .BYTE 0 273 | _wnd_idx: 274 | .BYTE 0,0 275 | _wnd_cur_line_num: 276 | .BYTE 0 277 | _wnd_type: 278 | .BYTE 0,0 279 | _wnd_width_tile: 280 | .BYTE 0,0 281 | _wnd_height_tile: 282 | .BYTE 0,0 283 | _wnd_left_tile: 284 | .BYTE 0,0 285 | _wnd_top_tile: 286 | .BYTE 0,0 287 | _wnd_width: 288 | .BYTE 0,0 289 | _wnd_line_tmp_ppu_ofs: 290 | .BYTE 0,0 291 | word_9B: 292 | .BYTE 0,0 293 | _wnd_line_tmp_width: 294 | .BYTE 0 295 | _wnd_line_tmp_height: 296 | .BYTE 0 297 | byte_9F: 298 | .BYTE 0 299 | byte_A0: 300 | .BYTE 0 301 | 302 | _tpos _cur_wnd_pos 303 | 304 | _tpos _cur_wnd_pos_backup 305 | 306 | _wnd_left_pos: 307 | .BYTE 0 308 | _wnd_top_pos: 309 | .BYTE 0 310 | _wnd_right_pos: 311 | .BYTE 0 312 | _wnd_bottom_pos: 313 | .BYTE 0 314 | _gui_ctrl_menu_redraw_flag: 315 | .BYTE 0 316 | byte_AA: 317 | .BYTE 0 318 | byte_AB: 319 | .BYTE 0 320 | _constr_palette_update_req: 321 | .BYTE 0 322 | _constr_palette_flags: 323 | .BYTE 0,0,0,0 324 | 325 | ; NOTE: this is a copy of _constr_palette_selected_idx and has the same 326 | ; value, used only in const palette enable test routine 327 | ; 328 | _cur_constr_palette_selected_idx: 329 | .BYTE 0 330 | 331 | word_B2: 332 | .BYTE 0,0 333 | _tmp_extnt_dst_ofs: 334 | .BYTE 0,0 335 | byte_B6: 336 | .BYTE 0 337 | _constr_palette_selected_idx: 338 | .BYTE 0 339 | _constr_palette_press_idx: 340 | .BYTE 0 341 | _cur_game_cursor_area: 342 | .BYTE 0 343 | 344 | _tpos _cur_game_cursor_scr_pos 345 | 346 | _tpos _constr_cursor_tile 347 | 348 | _pal_anim_counter: 349 | .BYTE 0 350 | ;_unref_10: 351 | ; .BYTE 0 352 | _cur_building_size: 353 | .BYTE 0 354 | _tmp_ptrC1: 355 | .BYTE 0,0 356 | _tmp_ptrC3: 357 | .BYTE 0,0 358 | _tmp_ptrC5: 359 | .BYTE 0,0 360 | _cur_build_sample_tile_idx: 361 | .BYTE 0 362 | _cur_power_type_select_idx: 363 | .BYTE 0 364 | _cur_port_type_select_idx: 365 | .BYTE 0 366 | _cur_build_store_tile_idx: 367 | .BYTE 0 368 | _bulldoze_tile_idx: 369 | .BYTE 0 370 | _cur_bulldoze_size: 371 | .BYTE 0 372 | _bulldoze_error_beep_flag: 373 | .BYTE 0 374 | _bulldoze_start_delta_col: 375 | .BYTE 0 376 | _bulldoze_start_delta_row: 377 | .BYTE 0 378 | word_D0: 379 | .BYTE 0,0 380 | word_D2: 381 | .BYTE 0,0 382 | byte_D4: 383 | .BYTE 0 384 | byte_D5: 385 | .BYTE 0 386 | _hud_build_name_draw_req: 387 | .BYTE 0 388 | ;_hud_build_name_src_ofs: ; REDUNDANT, not used anymore 389 | ; .BYTE 0 390 | _game_msg_idx: 391 | .BYTE 0 392 | ;_prev_game_msg_idx: ; REDUNDANT, unused anymore 393 | ; .BYTE 0 394 | _game_msg_awaits_flag: 395 | .BYTE 0 396 | word_DA: 397 | .BYTE 0,0 398 | _ptrDC: 399 | .BYTE 0,0 400 | ;_unref_11: 401 | ; .BYTE 0,0,0,0,0,0,0 402 | _tmpE5: 403 | .BYTE 0 404 | 405 | _tmpE6 EQU . 406 | _tmpE7 EQU _tmpE6+1 407 | _tmpE8 EQU _tmpE6+2 408 | _tmpE9 EQU _tmpE6+3 409 | 410 | _tfix16_16 _dvdn 411 | 412 | _tmpEA EQU . 413 | _tmpEB EQU _tmpEA+1 414 | 415 | _tfix8_8 _dvdr 416 | 417 | _ptrEC: 418 | .BYTE 0,0 419 | _ptrEE: 420 | .BYTE 0,0 421 | 422 | _apu_mus_idx_req: 423 | .BYTE 0 424 | _apu_se_idx_req: 425 | .BYTE 0,0 426 | _apu_mus_seq_ofs: 427 | .BYTE 0 428 | _apu_se_loop_idx: 429 | .BYTE 0,0 430 | _apu_tmpF6: 431 | .BYTE 0 432 | _apu_tmpF7: 433 | .BYTE 0 434 | _apu_se_loop_counters: 435 | .BYTE 0,0 436 | _apu_trk_data_ptr: 437 | .BYTE 0,0 438 | _apu_dpcm_disable_flag: 439 | .BYTE 0 440 | _apu_se80_loop_counter: 441 | .BYTE 0 442 | 443 | _tpos _info_maps_rect_pos 444 | 445 | _tpos _map_start_pos 446 | 447 | _tpos _map_pos 448 | 449 | _tpos _map_tmp_pos 450 | 451 | _tpos _tmp_map_pos 452 | 453 | _tmp_map_pos_backup_buf_Y: 454 | .BYTE 0,0,0 455 | _tmp_map_pos_backup_buf_X: 456 | .BYTE 0,0,0 457 | 458 | _tpos _tmp_area_pos 459 | 460 | ECHO "-------------" 461 | ECHO "zero ram free:",[$100-.] 462 | ECHO "-------------" 463 | 464 | ORG $0100 465 | 466 | _mmc5_nt_mode_shadow: 467 | .BYTE 0 468 | _screen_refresh_req: 469 | .BYTE 0 470 | _game_msg_wnd_active_flag: 471 | .BYTE 0 472 | _thread0_flags: 473 | .BYTE 0,0 474 | _thread_priority_req: 475 | .BYTE 0 476 | _game_core_state: 477 | .BYTE 0 478 | _mini_map_need_redraw_flag: 479 | .BYTE 0 480 | _thread1_flags: 481 | .BYTE 0,0 482 | ;_unref_13: 483 | ; .BYTE 0,0,0 484 | _mini_map_cur_row: 485 | .BYTE 0 486 | _mini_map_cur_col: 487 | .BYTE 0 488 | ;_unref_14: 489 | ; .BYTE 0,0 490 | 491 | _tpos _last_water_tile_pos ; NEW: new var for ship deploy 492 | 493 | _cur_info_maps_button_idx: 494 | .BYTE 0 495 | _prev_info_maps_button_idx: 496 | .BYTE 0 497 | _scr_res_window_opened_flag: 498 | .BYTE 0 499 | _scr_res_control_flags: 500 | .BYTE 0 501 | _scr_res_idx: 502 | .BYTE 0 503 | _tmp118: 504 | .BYTE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 505 | byte_127: 506 | .BYTE 0 507 | byte_128: 508 | .BYTE 0 509 | byte_129: 510 | .BYTE 0 511 | byte_12A: 512 | .BYTE 0 513 | _new_map_number: 514 | .BYTE 0,0 515 | _game_wnd_spr_mode_flag: 516 | .BYTE 0 517 | _info_maps_menu_extra_idx: 518 | .BYTE 0,0,0 519 | byte_131: 520 | .BYTE 0 521 | _budget_tax_adjust_value: 522 | .BYTE 0 523 | _max_tax_rate: 524 | .BYTE 0,0 525 | _taxes_income: 526 | .BYTE 0,0,0 527 | 528 | ; _tpos _info_maps_rect_pos 529 | 530 | _info_maps_menu_extra_value_backup: 531 | .BYTE 0 532 | _budget_screen_return_to_info_maps_flag: 533 | .BYTE 0 534 | _info_maps_button_pending: 535 | .BYTE 0 536 | _city_eval_string_counter: 537 | .BYTE 0 538 | _obj_active_flags: 539 | .BYTE 0 540 | _frames_div4_counter: 541 | .BYTE 0 542 | _new_city_screen_cur_row_idx: 543 | .BYTE 0 544 | _new_city_screen_cur_col_idx: 545 | .BYTE 0 546 | _title_sub_idx: 547 | .BYTE 0 548 | _cur_obj_idx: 549 | .BYTE 0 550 | ;_unref_16: 551 | ; .BYTE 0 552 | _obj_tornado_counter: 553 | .BYTE 0 554 | _obj_plane_anim_idx: 555 | .BYTE 0 556 | _obj_plane_anim_timer: 557 | .BYTE 0 558 | 559 | _tpos _last_airport_pos 560 | 561 | _obj_monster_delay: 562 | .BYTE 0 563 | _obj_monster_anim_phase0: 564 | .BYTE 0 565 | _obj_monster_anim_phase1: 566 | .BYTE 0 567 | _obj_monster_chr_idx: 568 | .BYTE 0 569 | _obj_monster_spr_idx: 570 | .BYTE 0 571 | 572 | _tobj6w _obj_shift 573 | 574 | _new_city_map_regen_req: 575 | .BYTE 0 576 | _new_city_map_regen_delay: 577 | .BYTE 0 578 | _new_city_digit_spr_y_pos: 579 | .BYTE 0 580 | _new_city_button_to_change_flags: 581 | .BYTE 0 582 | byte_15F: 583 | .BYTE 0 584 | 585 | ORG $160 586 | 587 | _tarray _stack_upper,$50 588 | 589 | _tarray _stack_lower,$50 590 | 591 | ORG $200 592 | 593 | _tarray _spr_buf,$100 594 | 595 | ORG $300 596 | 597 | _tarray _ppu_queue_buf,$100 598 | 599 | ORG $400 600 | 601 | _tarray _extnt_queue_buf,$100 602 | 603 | ORG $500 604 | 605 | _pad0_autorep_delay: 606 | .BYTE 0 607 | _RCI_meter_redraw_req: 608 | .BYTE 0 609 | 610 | _trci _RCI_meters_values 611 | 612 | _common_yes_no_menu_cursor_pos: 613 | .BYTE 0 614 | 615 | _tpos _cur_obj_pos 616 | 617 | _tpos _cur_dst_pos 618 | 619 | _ppu_pal_dequeue_req: 620 | .BYTE 0 621 | _screen_pal_cur_spr_idx: 622 | .BYTE 0 623 | _screen_pal_cur_bg_idx: 624 | .BYTE 0 625 | 626 | _tpos _prev_constr_cursor_tile 627 | 628 | _tpos _cur_constr_cursor_map_pos 629 | 630 | _tmp511: 631 | .BYTE 0 632 | _tmp512: 633 | .BYTE 0 634 | _hud_date_redraw_req: 635 | .BYTE 0 636 | _tmp514: 637 | .BYTE 0 638 | ;_unref_5: 639 | ; .BYTE 0 640 | _tmp_popul_hex: 641 | .BYTE 0,0,0 642 | _tmp51A: 643 | .BYTE 0 644 | _tmp51B: 645 | .BYTE 0 646 | _tmp_popul_decimal_buf: 647 | .BYTE 0,0,0,0,0,0 648 | _tmp522: 649 | .BYTE 0 650 | _tmp523: 651 | .BYTE 0 652 | _nmi_seconds_timer: 653 | .BYTE 0 654 | _nmi_frames_timer: 655 | .BYTE 0 656 | _presents_build_menu_req: 657 | .BYTE 0 658 | _cur_present_select_idx: 659 | .BYTE 0 660 | _tmp528: 661 | .BYTE 0 662 | _tmp529: 663 | .BYTE 0 664 | _tmp52A: 665 | .BYTE 0 666 | _tmp52B: 667 | .BYTE 0 668 | _tmp52C: 669 | .BYTE 0 670 | _tmp52D: 671 | .BYTE 0 672 | _tmp52E: 673 | .BYTE 0 674 | _tmp52F: 675 | .BYTE 0 676 | _tmp530: 677 | .BYTE 0 678 | _input_forbid_delay: 679 | .BYTE 0 680 | _game_core_stop_flag: 681 | .BYTE 0 682 | _tmp533: 683 | .BYTE 0 684 | _tmp534: 685 | .BYTE 0 686 | _map_bg_anim_counter: 687 | .BYTE 0 688 | _game_core_timer: 689 | .BYTE 0 690 | _debug_scroll_msg_flags: 691 | .BYTE 0 692 | _stadium_anim_enable_flag: 693 | .BYTE 0 694 | _scroll_msg_active_flag: 695 | .BYTE 0 696 | _scroll_msg_shift_pos: 697 | .BYTE 0 698 | _scroll_msg_idx: 699 | .BYTE 0 700 | _scroll_msg_start_pos: 701 | .BYTE 0 702 | _scroll_msg_end_char: 703 | .BYTE 0 704 | _power_build_menu_req: 705 | .BYTE 0 706 | _airport_build_menu_req: 707 | .BYTE 0 708 | _hud_popul_redraw_req: 709 | .BYTE 0 710 | _hud_city_name_redraw_req: 711 | .BYTE 0 712 | _tmp542: 713 | .BYTE 0 714 | _tmp543: 715 | .BYTE 0 716 | _tmp544: 717 | .BYTE 0 718 | _tmp545: 719 | .BYTE 0 720 | _tmp546: 721 | .BYTE 0 722 | _tmp547: 723 | .BYTE 0 724 | 725 | _tpos _constr_palette_area_cursor_pos 726 | 727 | _tpos _game_map_area_cursor_pos_backup 728 | 729 | _tobj6w _obj_pos 730 | 731 | _tobj6w _obj_dst_pos 732 | 733 | _tobj4b _obj_cur_spr_idx 734 | 735 | _tobj4b _obj_dst_spr_idx 736 | 737 | _tobj4b _obj_spr_delta 738 | 739 | ;_unref?: 740 | ; .BYTE 0 741 | _train_hide_mode: 742 | .BYTE 0 743 | _train_turns_counter: 744 | .BYTE 0 745 | 746 | ; _tpos _map_start_pos 747 | ; 748 | ; _tpos _map_pos 749 | ; 750 | ; _tpos _map_tmp_pos 751 | 752 | _tmp579: 753 | .BYTE 0 754 | _tmp57A: 755 | .BYTE 0 756 | _tmp57B: 757 | .BYTE 0 758 | _tmp57C: 759 | .BYTE 0 760 | _tmp57D: 761 | .BYTE 0 762 | _map_dir: 763 | .BYTE 0 764 | _map_last_dir: 765 | .BYTE 0 766 | _tmp580: 767 | .BYTE 0 768 | _tmp581: 769 | .BYTE 0 770 | _tmp582: 771 | .BYTE 0 772 | _main_sub_idx: 773 | .BYTE 0 774 | 775 | ; budget calc vars 776 | ; 777 | _loan_fee: 778 | .WORD 0 779 | _budget_display_timer: 780 | .WORD 0 781 | _budget_tax_cur_pos: 782 | .BYTE 0 783 | 784 | _tfund16 _budget_fund_alloc 785 | 786 | _tfund8 _budget_fund_rate 787 | 788 | _budget_funds_alloc_sum: 789 | .BYTE 0,0,0 790 | _budget_funds_alloc_sum_loan: 791 | .BYTE 0,0,0 792 | _budget_money: 793 | .BYTE 0,0,0 794 | ; - 795 | 796 | _cur_graphs_button_press_idx: 797 | .BYTE 0 798 | _prev_graphs_button_press_idx: 799 | .BYTE 0 800 | _graphs_scr_period_mode: 801 | .BYTE 0 802 | _graphs_draw_data_pos: 803 | .BYTE 0 804 | _game_setup_sub_idx: 805 | .BYTE 0 806 | _scenario_result_idx: 807 | .BYTE 0 808 | _mmc5_mul1_shadow: 809 | .BYTE 0 810 | _mmc5_mul0_shadow: 811 | .BYTE 0 812 | _backup_var: 813 | .BYTE 0 814 | _mmc5_tmp_mul_result: 815 | .BYTE 0 816 | _mmc5_tmp_mul_data: 817 | .WORD 0 818 | _has_saved_city_data_flag: 819 | .BYTE 0 820 | word_5A9: 821 | .BYTE 0,0 822 | _tmp5AB: 823 | .BYTE 0 824 | _tmp5AC: 825 | .BYTE 0 826 | _tmp5AD: 827 | .BYTE 0 828 | _tmp5AE: 829 | .BYTE 0 830 | _tmp5AF: 831 | .BYTE 0 832 | _mmc5_chr_banks_shadow: 833 | .BYTE 0,0,0,0 834 | 835 | _tcity _city 836 | 837 | ; FIX of SAVE/LOAD, also aliases to not to rename a lot again 838 | _cur_game_mode EQU _city._cur_game_mode 839 | _scenario_idx EQU _city._scenario_idx 840 | ; 841 | 842 | _goto_alert_req: 843 | .BYTE 0 844 | _goto_in_progress_delay: 845 | .BYTE 0 846 | 847 | _tpos _goto_dst_tile 848 | 849 | _airplane_crash_req: 850 | .BYTE 0 851 | _budget_scr_draw_req: 852 | .BYTE 0 853 | _city_taxes_collected: 854 | .BYTE 0,0,0 855 | 856 | ; global city funding parameters 857 | ; 858 | ; rate of funding, recalculated twice: in THREAD1 while collecting data 859 | ; and in THREAD0 when adjusting the budget, has a default values 860 | ; at the beginning of the game 861 | ; 862 | ; ALERT! keep order the same for all these vars, it's important! 863 | ; 864 | _fund_rate_fire: 865 | .BYTE 0 866 | _fund_rate_police: 867 | .BYTE 0 868 | _fund_rate_trans: 869 | .BYTE 0 870 | ; 871 | ; requested funding amounts recalculated every time by THREAD1 872 | ; 873 | _fund_request_fire: 874 | .BYTE 0,0 875 | _fund_request_police: 876 | .BYTE 0,0 877 | _fund_request_trans: 878 | .BYTE 0,0 879 | _fund_request_education: 880 | .BYTE 0,0 881 | ; 882 | ; actual current funding amounts 883 | ; 884 | _fund_alloc_fire: 885 | .BYTE 0,0 886 | _fund_alloc_police: 887 | .BYTE 0,0 888 | _fund_alloc_trans: 889 | .BYTE 0,0 890 | _fund_alloc_education: 891 | .BYTE 0,0 892 | ; - 893 | 894 | _doing_a_good_job_votes: 895 | .BYTE 0 896 | _doing_a_bad_job_votes: 897 | .BYTE 0 898 | _popul_cur: 899 | .BYTE 0,0,0 900 | _popul_net_migration: 901 | .BYTE 0,0,0 902 | _assessed_value: 903 | .BYTE 0,0,0 904 | _annual_score_change: 905 | .BYTE 0,0 906 | _prev_city_score: 907 | .BYTE 0,0 908 | _worst_problem_list: 909 | .BYTE 0,0,0,0 910 | _worst_problem_percents: 911 | .BYTE 0,0,0,0 912 | 913 | _tfix8_8 _cur_RCI_levels_sum 914 | 915 | _earthquake_shake_req: 916 | .BYTE 0 917 | 918 | ; - 919 | ; following are set of various statistics of the city 920 | _total_RCI_counts: 921 | .BYTE 0,0 922 | 923 | _trciw _RCI_counts 924 | 925 | _fires_count: 926 | .BYTE 0,0 927 | 928 | ; these vars are accessed individually in the statistic 929 | ; crawler, however, for the overview screen they are put 930 | ; into ptr list and accessed via indexes, if you change 931 | ; it's order, make sure you change indexes as well 932 | ; 933 | _hospitals_count: 934 | .BYTE 0,0 935 | _schools_count: 936 | .BYTE 0,0 937 | _police_stations_count: 938 | .BYTE 0 939 | _fire_stations_count: 940 | .BYTE 0 941 | _stadiums_count: 942 | .BYTE 0 943 | _coal_power_station_count: 944 | .BYTE 0 945 | _nuke_power_station_count: 946 | .BYTE 0 947 | _sea_ports_count: 948 | .BYTE 0 949 | _airports_count: 950 | .BYTE 0 951 | _roads_count: 952 | .BYTE 0,0 953 | _rails_count: 954 | .BYTE 0,0 955 | _electrics_count: 956 | .BYTE 0,0 957 | 958 | ; structured already, access can be indirect or individual 959 | ; as well. 960 | ; 961 | _tdev _stats 962 | 963 | ; NOTE, following counters are used as an array of similar 964 | ; parameters and accessed indirectly! so don't change its 965 | ; order! 966 | ; 967 | _parks_count: 968 | .BYTE 0,0 969 | _woods_count: 970 | .BYTE 0,0 971 | _ground_count: 972 | .BYTE 0,0 973 | _water_count: 974 | .BYTE 0,0 975 | 976 | _counters_area_size EQU [.-_total_RCI_counts] 977 | 978 | ; end if statistic parameters 979 | ; - 980 | 981 | _corruption_anim_req: 982 | .BYTE 0 983 | 984 | ; _tpos _tmp_map_pos 985 | 986 | _last_map_tile_read: 987 | .BYTE 0 988 | _cur_map_tile_is_inside_a_building_flag: 989 | .BYTE 0 990 | _cur_area_power_state: 991 | .BYTE 0 992 | _powered_areas: 993 | .BYTE 0,0 994 | _hospitals_delta: 995 | .BYTE 0 996 | _schools_delta: 997 | .BYTE 0 998 | _tmp6AA: 999 | .BYTE 0,0 1000 | _tmp6AC: 1001 | .BYTE 0,0 1002 | 1003 | _treq _required 1004 | 1005 | _cur_area_develop_state: 1006 | .BYTE 0 1007 | 1008 | _tfix8_8 _prev_RCI_levels_sum 1009 | 1010 | _popul_last_year: 1011 | .BYTE 0,0,0 1012 | 1013 | _tpos _city_center_pos 1014 | 1015 | ;_tmp_map_pos_backup_buf_Y: 1016 | ; .BYTE 0,0,0 1017 | ;_tmp_map_pos_backup_buf_X: 1018 | ; .BYTE 0,0,0 1019 | ; 1020 | ; _tpos _tmp_area_pos 1021 | 1022 | _life_ratio_idx: 1023 | .BYTE 0 1024 | _tmp6C4: 1025 | .BYTE 0 1026 | _power_nodes_cnt: 1027 | .BYTE 0,0 1028 | _RCI_max_range_10_years: 1029 | .BYTE 0 1030 | _RCI_max_range_100_years: 1031 | .BYTE 0 1032 | _disaster_tiles_to_flood_count: 1033 | .BYTE 0 1034 | _monster_in_water_flag: 1035 | .BYTE 0 1036 | _city_gone_broke_flag: 1037 | .BYTE 0 1038 | 1039 | ; END OF REINIT AREA 1040 | 1041 | _tmp6CC: 1042 | .BYTE 0 1043 | _tmp6CD: 1044 | .BYTE 0 1045 | 1046 | _problem_data SET . 1047 | 1048 | _tmp6CE: 1049 | .BYTE 0 1050 | _tmp6CF: 1051 | .BYTE 0 1052 | _tmp6D0: 1053 | .BYTE 0 1054 | _tmp6D1: 1055 | .BYTE 0 1056 | _tmp6D2: 1057 | .BYTE 0 1058 | _tmp6D3: 1059 | .BYTE 0 1060 | _tmp6D4: 1061 | .BYTE 0 1062 | _tmp6D5: 1063 | .BYTE 0 1064 | _tmp6D6: 1065 | .BYTE 0,0 1066 | _tmp6D8: 1067 | .BYTE 0 1068 | _tmp6D9: 1069 | .BYTE 0 1070 | _tmp6DA: 1071 | .BYTE 0 1072 | _tmp6DB: 1073 | .BYTE 0 1074 | 1075 | _tmp6DC EQU . 1076 | _problem_accepted: 1077 | .BYTE 0,0,0,0,0,0,0 1078 | ; one of these vars used as tmp value _tmp_name_input_mode_idx 1079 | ; in name input system 1080 | _problem_percent: 1081 | .BYTE 0,0,0,0,0,0,0 1082 | 1083 | ORG $700 1084 | 1085 | _tarray _pre_ppu_buf,$40 1086 | 1087 | _ram_signature: 1088 | .BYTE 0,0,0,0 1089 | 1090 | ORG $7C0 1091 | 1092 | _pal_bg_buf: 1093 | .BYTE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1094 | _pal_spr_buf: 1095 | .BYTE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1096 | 1097 | _apu_mus_p1_delay: 1098 | .BYTE 0 1099 | _apu_mus_p2_delay: 1100 | .BYTE 0 1101 | _apu_mus_tri_delay: 1102 | .BYTE 0 1103 | 1104 | _apu_mus_p1_timer: 1105 | .BYTE 0 1106 | _apu_mus_p2_timer: 1107 | .BYTE 0 1108 | _apu_mus_tri_timer: 1109 | .BYTE 0 1110 | 1111 | _apu_mus_p1_data_pos: 1112 | .BYTE 0 1113 | _apu_mus_p2_data_pos: 1114 | .BYTE 0 1115 | _apu_mus_tri_data_pos: 1116 | .BYTE 0 1117 | 1118 | _apu_mus_v09: 1119 | .BYTE 0 1120 | _apu_mus_tempo: 1121 | .BYTE 0 1122 | _apu_mus_v0B: 1123 | .BYTE 0 1124 | _apu_mus_v0C: 1125 | .BYTE 0 1126 | _apu_mus_dmc_data_pos: 1127 | .BYTE 0 1128 | _apu_mus_dmc_timer: 1129 | .BYTE 0 1130 | _apu_mus_p1_tempo_delta: 1131 | .BYTE 0 1132 | 1133 | _apu_mus_p1_time_lo: 1134 | .BYTE 0 1135 | _apu_mus_p2_tempo_delta: 1136 | .BYTE 0 1137 | _apu_mus_p1_tempo_cnt: 1138 | .BYTE 0 1139 | _apu_mus_p2_tempo_cnt: 1140 | .BYTE 0 1141 | _apu_mus_p2_time_lo: 1142 | .BYTE 0 1143 | _apu_mus_envelope: 1144 | .BYTE 0 1145 | _apu_mus_cur_idx: 1146 | .BYTE 0 1147 | _apu_mus_dmc_delay: 1148 | .BYTE 0 1149 | _apu_mus_tri_time_lo: 1150 | .BYTE 0 1151 | _apu_mus_p1_release_mode: 1152 | .BYTE 0 1153 | _apu_mus_p2_release_mode: 1154 | .BYTE 0 1155 | _apu_mus_fade_out_timer: 1156 | .BYTE 0 1157 | 1158 | ;--------------------P-P-U---------------------- 1159 | 1160 | ORG $2000 1161 | 1162 | _PPU_CTRL: 1163 | .BYTE 0 1164 | _PPU_MASK: 1165 | .BYTE 0 1166 | _PPU_STATUS: 1167 | .BYTE 0 1168 | _PPU_OAM_ADDR: 1169 | .BYTE 0 1170 | _PPU_OAM_DATA: 1171 | .BYTE 0 1172 | _PPU_SCROLL: 1173 | .BYTE 0 1174 | _PPU_ADDR: 1175 | .BYTE 0 1176 | _PPU_DATA: 1177 | .BYTE 0 1178 | 1179 | ;--------------------A-P-U---------------------- 1180 | 1181 | ORG $4000 1182 | 1183 | _APU_PULSE1_ENV: 1184 | .BYTE 0 1185 | _APU_PULSE1_SWEEP: 1186 | .BYTE 0 1187 | _APU_PULSE1_TIME: 1188 | .BYTE 0 1189 | _APU_PULSE1_LEN: 1190 | .BYTE 0 1191 | _APU_PULSE2_ENV: 1192 | .BYTE 0 1193 | _APU_PULSE2_SWEEP: 1194 | .BYTE 0 1195 | _APU_PULSE2_TIME: 1196 | .BYTE 0 1197 | _APU_PULSE2_LEN: 1198 | .BYTE 0 1199 | _APU_TRI_COUNT: 1200 | .BYTE 0 1201 | _APU_TRI_UNUSED: 1202 | .BYTE 0 1203 | _APU_TRI_TIME: 1204 | .BYTE 0 1205 | _APU_TRI_LEN: 1206 | .BYTE 0 1207 | _APU_NOISE_ENV: 1208 | .BYTE 0 1209 | _APU_NOISE_UNUSED: 1210 | .BYTE 0 1211 | _APU_NOISE_LOOP: 1212 | .BYTE 0 1213 | _APU_NOISE_LEN: 1214 | .BYTE 0 1215 | _APU_DMC_FREQ: 1216 | .BYTE 0 1217 | _APU_DMC_LOAD: 1218 | .BYTE 0 1219 | _APU_DMC_ADDR: 1220 | .BYTE 0 1221 | _APU_DMC_LEN: 1222 | .BYTE 0 1223 | _PPU_OAM_DMA: 1224 | .BYTE 0 1225 | _APU_STATUS: 1226 | .BYTE 0 1227 | _PAD0_REG: 1228 | .BYTE 0 1229 | _PAD1_REG: 1230 | .BYTE 0 1231 | 1232 | ; ORG $4083 1233 | ; 1234 | ;byte_4083: 1235 | ; .BYTE 0 1236 | ;byte_4084: 1237 | ; .BYTE 0 1238 | 1239 | ORG $5100 1240 | 1241 | _MMC5_PRG_SIZE: 1242 | .BYTE 0 1243 | _MMC5_CHR_SIZE: 1244 | .BYTE 0 1245 | _MMC5_WRAM0_ENABLE: 1246 | .BYTE 0 1247 | _MMC5_WRAM1_ENABLE: 1248 | .BYTE 0 1249 | _MMC5_CHR_MODE: 1250 | .BYTE 0 1251 | _MMC5_NT_MODE: 1252 | .BYTE 0 1253 | _MMC5_NT_FILL: 1254 | .BYTE 0 1255 | _MMC5_AT_FILL: 1256 | .BYTE 0,0,0,0,0,0,0,0,0,0,0,0 1257 | _MMC5_PRG_PAGES: 1258 | .BYTE 0,0,0,0,0 1259 | .BYTE 0,0,0,0,0,0,0,0 1260 | _MMC5_CHR_BANKSA: 1261 | .BYTE 0,0,0,0,0,0,0,0 1262 | _MMC5_CHR_BANKSB: 1263 | .BYTE 0,0,0,0,0,0,0,0 1264 | 1265 | ORG $5200 1266 | 1267 | _MMC5_SP_MODE: 1268 | .BYTE 0 1269 | _MMC5_SP_SCROLL: 1270 | .BYTE 0 1271 | _MMC5_SP_PAGE: 1272 | .BYTE 0,0 1273 | _MMC5_IRQ_ENABLE: 1274 | .BYTE 0 1275 | _MMC5_MUL0: 1276 | .BYTE 0 1277 | _MMC5_MUL1: 1278 | .BYTE 0 1279 | 1280 | ORG $5C00 1281 | 1282 | _tarray _MMC5_EXRAM,$400 1283 | 1284 | ORG $6000 1285 | 1286 | ; 8-bits array, 76 rows, 76 columns 1287 | _tarray _city_map,76*76 1288 | 1289 | ; 1-bits array, 76 rows, 76 columns 1290 | _tarray _power_map,(76*76)/8 1291 | 1292 | ; 4-bits array, 38 rows, 38 columns (76/2) 1293 | _tarray _traffic_map,(38*38)/2 1294 | 1295 | ORG $7C40 1296 | 1297 | _tarray _nt_backup0,$100 1298 | _tarray _nt_backup1,$E0 1299 | _tarray _extnt_backup0,$100 1300 | _tarray _extnt_backup1,$E0 1301 | 1302 | ORG $8000 1303 | 1304 | ; 4-bits array, 19 rows, 19 columns (76/4) 1305 | _tarray _land_val_map,((19*19)/2)+1 1306 | 1307 | ; 4-bits array, 19 rows, 19 columns 1308 | _tarray _crime_map,((19*19)/2)+1 1309 | 1310 | ; 4-bits array, 19 rows, 19 columns 1311 | _tarray _pollution_map,((19*19)/2)+1 1312 | 1313 | ; 4-bits array, 19 rows, 19 columns 1314 | _tarray _pop_dencity_map,((19*19)/2)+1 1315 | 1316 | ; 4-bits array, 19 rows, 19 columns 1317 | _tarray _pop_growth_map,((19*19)/2)+1 1318 | 1319 | ; 4-bits array, 10 rows, 10 columns 1320 | _tarray _police_map,(10*10)/2 1321 | 1322 | ; 4-bits array, 10 rows, 10 columns 1323 | _tarray _fire_map,(10*10)/2 1324 | 1325 | _tarray _tmp_map,1024 1326 | 1327 | _tgraphs _graphs 1328 | 1329 | ; SAVE DATA AREA 1330 | 1331 | _sram_data_crc: 1332 | .WORD 0 1333 | 1334 | _tgraphs _sram_graphs 1335 | 1336 | ; 8-bits array, 76 rows, 76 columns 1337 | _tarray _sram_city_map,76*76 1338 | 1339 | _tcity _sram_vars 1340 | 1341 | _sram_has_saved_city_data_flag: 1342 | .BYTE 0 1343 | 1344 | #if .>$A000 1345 | ECHO "OUT OF SRAM=",[.-$A000] 1346 | #endif 1347 | -------------------------------------------------------------------------------- /bank6.inc: -------------------------------------------------------------------------------- 1 | 2 | ORG $8000 3 | 4 | BANK_START $F6 5 | 6 | ; --------------------------------------------------------------------------- 7 | ; ------S-C-R-E-E-N--R-E-S-O-U-R-C-E-S--T-I-L-E-M-A-P-S--A-N-D--D-R-A-W------ 8 | ; --------------------------------------------------------------------------- 9 | 10 | SECTION_START 902 11 | 12 | ; =============== S U B R O U T I N E ======================================= 13 | _scr_common_draw: 14 | LDA _scr_res_idx ; _scr_res_idx here already *2 15 | BNE loc_A0A9A 16 | LDA #$10 ; here is the only place with cursor reposition 17 | STA _cur_game_cursor_scr_pos._COL ; other screens uses its own cursors or 18 | LDA #$62 ; ingame cursor position (at HUD info maps button) 19 | STA _cur_game_cursor_scr_pos._ROW 20 | LDX #$24 ; for info maps screen 21 | LDA #$DF 22 | JSR _ppu_area_fill ; clear NT1 with DF (space) 23 | LDX #$2C 24 | LDA #$01 25 | JSR _ppu_area_fill ; clear EXTNT mapper do NT3 with 01 26 | ; MOVWO _ptr0,_tlm_res_info_maps_nt_common 27 | LDXY _tlm_res_info_maps_nt_common 28 | ; JSR _res_ppu_unpack ; REDUNDANT, merged 29 | ; MOVWO _ptr0,_tlm_res_info_maps_extnt_common 30 | JMP _res_ppu_unpack 31 | loc_A0A9A: 32 | ; OPTIMIZED, 156 bytes less 33 | ; - 34 | CMP #$0C 35 | BNE loc_A0A9B 36 | BIT _city._bank_flags 37 | BVS loc_A0A9B 38 | LDA #$10 39 | loc_A0A9B: 40 | TAY 41 | LDX _tlm_res_lz_scr_common_lib-2,Y 42 | LDA _tlm_res_lz_scr_common_lib-1,Y 43 | TAY 44 | PUSHB _mmc5_nt_mode_shadow 45 | LDA #$24 46 | STA _MMC5_NT_MODE 47 | JSR _res_ppu_lz_unpack 48 | POPB _MMC5_NT_MODE 49 | RTS 50 | ; - 51 | ; REDUNDANT 52 | ; CMP #$02 53 | ; BNE loc_A0AA1 54 | ; JMP _scr_res1_draw 55 | ;loc_A0AA1: 56 | ; CMP #$04 57 | ; BNE loc_A0AA8 58 | ; JMP _scr_res2_draw 59 | ;loc_A0AA8: 60 | ; CMP #$06 61 | ; BNE loc_A0AAF 62 | ; JMP _scr_res3_draw 63 | ;loc_A0AAF: 64 | ; CMP #$08 65 | ; BNE loc_A0AB6 66 | ; JMP _scr_res4_draw 67 | ;loc_A0AB6: 68 | ; CMP #$0A 69 | ; BNE loc_A0ABD 70 | ; JMP _scr_res5_draw 71 | ;loc_A0ABD: 72 | ; CMP #$0C 73 | ; BNE loc_A0AC4 74 | ; JMP _scr_res6_draw 75 | ;loc_A0AC4: 76 | ; CMP #$0E 77 | ; BNE locret_A0ACB 78 | ; JMP _scr_res7_draw 79 | ;locret_A0ACB: 80 | ; RTS 81 | ;_scr_res1_draw: 82 | ; PUSHB _mmc5_nt_mode_shadow 83 | ; LDA #$24 84 | ; STA _MMC5_NT_MODE 85 | ; JSRXY _res_ppu_lz_unpack,_tlm_res_lz_scr1 86 | ; POPB _MMC5_NT_MODE 87 | ; RTS 88 | ;_scr_res2_draw: 89 | ; PUSHB _mmc5_nt_mode_shadow 90 | ; LDA #$24 91 | ; STA _MMC5_NT_MODE 92 | ; JSRXY _res_ppu_lz_unpack,_tlm_res_lz_scr2 93 | ; POPB _MMC5_NT_MODE 94 | ; RTS 95 | ;_scr_res3_draw: 96 | ; PUSHB _mmc5_nt_mode_shadow 97 | ; LDA #$24 98 | ; STA _MMC5_NT_MODE 99 | ; JSRXY _res_ppu_lz_unpack,_tlm_res_lz_scr3 100 | ; POPB _MMC5_NT_MODE 101 | ; RTS 102 | ;_scr_res4_draw: 103 | ; PUSHB _mmc5_nt_mode_shadow 104 | ; LDA #$24 105 | ; STA _MMC5_NT_MODE 106 | ; JSRXY _res_ppu_lz_unpack,_tlm_res_lz_scr4 107 | ; POPB _MMC5_NT_MODE 108 | ; RTS 109 | ;_scr_res5_draw: 110 | ; PUSHB _mmc5_nt_mode_shadow 111 | ; LDA #$24 112 | ; STA _MMC5_NT_MODE 113 | ; JSRXY _res_ppu_lz_unpack,_tlm_res_lz_scr5 114 | ; POPB _MMC5_NT_MODE 115 | ; RTS 116 | ;_scr_res7_draw: 117 | ; PUSHB _mmc5_nt_mode_shadow 118 | ; LDA #$24 119 | ; STA _MMC5_NT_MODE 120 | ; JSRXY _res_ppu_lz_unpack,_tlm_res_lz_scr7 121 | ; POPB _MMC5_NT_MODE 122 | ; RTS 123 | ;_scr_res6_draw: 124 | ; PUSHB _mmc5_nt_mode_shadow 125 | ; LDA #$24 126 | ; STA _MMC5_NT_MODE 127 | ; BIT _city._bank_flags 128 | ; BVC loc_A0B5E 129 | ; LDXY _tlm_res_lz_scr6A 130 | ; BNE loc_A0B62 131 | ;loc_A0B5E: 132 | ; LDXY _tlm_res_lz_scr6B 133 | ;loc_A0B62: 134 | ; JSR _res_ppu_lz_unpack 135 | ; POPB _MMC5_NT_MODE 136 | ; RTS 137 | ; - 138 | 139 | _tlm_res_info_maps_nt_common: 140 | .BYTE $24,$6D,$01,$AF 141 | .BYTE $24,$E1,$08,$D0,$D1,$D1,$D1,$D1,$D2,$DF,$D0 142 | .BYTE $24,$E9,$53,$D1 143 | .BYTE $24,$FC,$01,$D2 144 | .BYTE $25,$01,$D0,$D3 145 | .BYTE $25,$02,$84,$20,$30,$8C,$9C 146 | .BYTE $25,$82,$CC,$DE 147 | .BYTE $25,$03,$84,$21,$31,$8D,$9D 148 | .BYTE $25,$83,$CC,$DE 149 | .BYTE $25,$04,$90,$00,$10,$02,$12,$04,$14,$06,$16,$08,$18,$0A,$1A,$0C,$1C,$0E,$1E 150 | .BYTE $25,$05,$90,$01,$11,$03,$13,$05,$15,$07,$17,$09,$19,$0B,$1B,$0D,$1D,$0F,$1F 151 | .BYTE $25,$06,$D0,$D4 152 | .BYTE $27,$01,$06,$D5,$D6,$D6,$D6,$D6,$D7 153 | .BYTE $25,$08,$D3,$D3 154 | .BYTE $25,$1C,$D3,$D4 155 | .BYTE $27,$68,$01,$D5 156 | .BYTE $27,$69,$53,$D6 157 | .BYTE $27,$7C,$01,$D7 158 | .BYTE $2C,$6D,$01,$82 159 | .BYTE $2C,$7B,$43,$42 160 | .BYTE $2C,$E8,$55,$81 161 | .BYTE $2D,$02,$C4,$83 ; $84,$83,$83,$83,$83 ; ORPIMIZED 162 | .BYTE $2D,$03,$C4,$83 ; $84,$83,$83,$83,$83 ; OPTIMIZED 163 | .BYTE $2D,$04,$90,$43,$43,$43,$43,$83,$83,$83,$83,$83,$83,$43,$43,$43,$43,$83,$83 164 | .BYTE $2D,$05,$90,$43,$43,$43,$43,$43,$43,$83,$83,$83,$83,$43,$43,$43,$43,$83,$83 165 | .BYTE $2D,$08,$D3,$81 166 | .BYTE $2F,$68,$55,$81 167 | .BYTE $2D,$1C,$D3,$81 168 | .BYTE $00 169 | 170 | _tlm_res_lz_scr_common_lib: 171 | .WORD _tlm_res_lz_scr1 172 | .WORD _tlm_res_lz_scr2 173 | .WORD _tlm_res_lz_scr3 174 | .WORD _tlm_res_lz_scr4 175 | .WORD _tlm_res_lz_scr5 176 | .WORD _tlm_res_lz_scr6A 177 | .WORD _tlm_res_lz_scr7 178 | .WORD _tlm_res_lz_scr6B 179 | 180 | _tlm_res_lz_scr2: 181 | .WORD $2400 182 | .BYTE 1 183 | .WORD _tlm_scr2_lz0 184 | _tlm_scr2_lz0: 185 | .BYTE $E4,$3F,$DF,$00,$A5,$3D,$A6,$01,$A7,$B5,$2A,$00,$64,$AB,$01,$C6 186 | .BYTE $00,$65,$C0,$25,$00,$00,$B7,$8B,$00,$60,$64,$BB,$01,$D6,$00,$65 187 | .BYTE $D0,$87,$00,$79,$00,$DC,$63,$AC,$38,$DC,$02,$B7,$B5,$DC,$63,$B0 188 | .BYTE $8A,$00,$B5,$25,$B8,$00,$B9,$89,$00,$B8,$63,$C0,$22,$DC,$65,$30 189 | .BYTE $08,$DC,$C7,$DF,$DF,$33,$DF,$6F,$C8,$C9,$89,$00,$B8,$63,$D0,$29 190 | .BYTE $DC,$00,$D7,$25,$D8,$00,$D9,$89,$00,$B8,$62,$BD,$02,$C5,$DC,$DC 191 | .BYTE $68,$36,$02,$DC,$DC,$24,$8D,$00,$B4,$00,$B7,$39,$B8,$00,$B9,$83 192 | .BYTE $00,$BE,$00,$C7,$25,$DF,$64,$52,$00,$DF,$64,$57,$23,$DF,$63,$5C 193 | .BYTE $01,$DF,$C9,$8A,$01,$5E,$64,$62,$00,$DF,$64,$67,$23,$DF,$62,$6C 194 | .BYTE $00,$DF,$86,$01,$7C,$64,$40,$05,$DF,$32,$DF,$DF,$DF,$DF,$85,$01 195 | .BYTE $A8,$02,$DF,$6F,$C8,$23,$DF,$00,$33,$86,$01,$7C,$64,$45,$9A,$01 196 | .BYTE $A8,$62,$4A,$62,$42,$99,$01,$A9,$64,$4D,$9A,$01,$A8,$22,$DF,$02 197 | .BYTE $42,$43,$44,$33,$DF,$05,$C9,$DC,$B7,$B5,$DC,$D7,$39,$D8,$03,$D9 198 | .BYTE $DC,$B7,$B5,$3D,$DC,$9F,$02,$5F,$84,$02,$5F,$65,$8A,$06,$DC,$DC 199 | .BYTE $DC,$DC,$DC,$DC,$24,$92,$02,$71,$68,$90,$96,$02,$AD,$29,$DC,$28 200 | .BYTE $2F,$8C,$02,$77,$67,$99,$97,$02,$AC,$22,$DC,$00,$BA,$2F,$BB,$00 201 | .BYTE $BC,$8D,$02,$79,$00,$CA,$22,$DD,$6A,$A1,$02,$DD,$DD,$CC,$8D,$02 202 | .BYTE $79,$00,$DA,$2F,$DB,$00,$CB,$F0,$26,$02,$79,$00,$C5,$3D,$C6,$00 203 | .BYTE $C7,$32,$FF,$23,$00,$87,$03,$CF,$04,$FF,$00,$44,$3C,$30,$83,$03 204 | .BYTE $E0,$27,$FF,$23,$C3,$23,$3F,$27,$FF,$E4,$3F,$06,$E4,$20,$8A,$2A 205 | .BYTE $58,$25,$4B,$86,$04,$6B,$25,$58,$9F,$04,$5F,$01,$8A,$8A,$3D,$05 206 | .BYTE $9F,$04,$9F,$89,$04,$9F,$25,$45,$07,$05,$05,$C5,$C5,$02,$05,$C5 207 | .BYTE $C5,$F0,$31,$04,$B7,$29,$05,$00,$0B,$F0,$39,$04,$B4,$05,$05,$45 208 | .BYTE $45,$45,$45,$45,$87,$04,$E5,$98,$05,$5C,$05,$85,$85,$05,$45,$45 209 | .BYTE $45,$87,$04,$BB,$85,$04,$EA,$00,$02,$23,$C5,$85,$05,$A8,$84,$04 210 | .BYTE $F4,$02,$85,$85,$02,$9F,$05,$9C,$8B,$05,$9C,$00,$45,$8D,$05,$A9 211 | .BYTE $00,$C5,$9E,$05,$B8,$8B,$05,$F7,$01,$05,$05,$87,$05,$97,$02,$05 212 | .BYTE $05,$05,$87,$05,$F0,$01,$45,$45,$F0,$38,$04,$FA,$F0,$35,$04,$B3 213 | .BYTE $92,$05,$2C,$9F,$06,$9C,$F0,$53,$06,$7C,$F0,$5F,$06,$50,$90,$04 214 | .BYTE $B0,$3E,$8A,$3F,$00,$02,$38,$44,$08,$83,$07,$DF,$28,$00,$87,$03 215 | .BYTE $F0,$27,$00,$FF 216 | _tlm_res_lz_scr5: 217 | .WORD $2400 218 | .BYTE 1 219 | .WORD _tlm_scr5_lz0 220 | _tlm_scr5_lz0: 221 | .BYTE $E4,$41,$DD,$00,$A5,$39,$A6,$00,$A7,$23,$DD,$00,$B5,$25,$D1,$0C 222 | .BYTE $0C,$01,$13,$14,$D1,$3D,$D1,$05,$16,$05,$0E,$14,$13,$26,$D1,$00 223 | .BYTE $B7,$8A,$00,$5E,$0C,$4C,$41,$53,$54,$D1,$7D,$D1,$45,$56,$45,$4E 224 | .BYTE $54,$53,$8C,$00,$76,$39,$78,$85,$00,$7D,$39,$20,$9F,$00,$BD,$85 225 | .BYTE $00,$7D,$39,$76,$F0,$5F,$00,$BD,$F0,$BF,$00,$BD,$F1,$05,$00,$BD 226 | .BYTE $39,$98,$84,$00,$7D,$00,$C5,$39,$C6,$00,$C7,$E4,$41,$DD,$E4,$3F 227 | .BYTE $00,$E4,$41,$01,$3B,$4A,$84,$04,$3E,$39,$18,$9F,$04,$5D,$85,$04 228 | .BYTE $5D,$39,$94,$85,$04,$5D,$39,$8B,$9F,$04,$BD,$85,$04,$5D,$39,$14 229 | .BYTE $F0,$5F,$04,$BD,$F0,$BF,$04,$BD,$F1,$05,$04,$BD,$39,$94,$00,$4A 230 | .BYTE $F0,$23,$04,$3E,$E4,$3D,$01,$27,$00,$22,$10,$83,$07,$C7,$14,$10 231 | .BYTE $00,$00,$00,$00,$00,$00,$00,$00,$10,$10,$10,$10,$10,$10,$10,$10 232 | .BYTE $10,$10,$10,$10,$93,$07,$CC,$27,$00,$FF 233 | _tlm_res_lz_scr7: 234 | .WORD $2400 235 | .BYTE 1 236 | .WORD _tlm_scr7_lz0 237 | _tlm_scr7_lz0: 238 | .BYTE $E4,$21,$DD,$00,$A5,$32,$A6,$00,$A7,$2A,$DD,$14,$B5,$00,$07,$25 239 | .BYTE $2E,$25,$32,$21,$34,$25,$00,$0E,$25,$37,$00,$0D,$21,$30,$00,$00 240 | .BYTE $B7,$8C,$00,$37,$0F,$47,$65,$6E,$65,$72,$61,$54,$65,$00,$4E,$65 241 | .BYTE $77,$00,$4D,$61,$70,$8F,$00,$54,$2E,$00,$00,$B1,$8D,$00,$54,$00 242 | .BYTE $C5,$32,$C6,$00,$C7,$E4,$2A,$DD,$00,$C0,$32,$C1,$02,$C2,$DD,$A8 243 | .BYTE $23,$A9,$01,$AA,$DE,$22,$DD,$00,$D0,$32,$DD,$07,$D2,$DD,$B8,$4E 244 | .BYTE $45,$58,$54,$BA,$9A,$00,$FE,$05,$4D,$41,$50,$20,$BA,$DD,$98,$00 245 | .BYTE $FF,$00,$C8,$23,$C9,$00,$CA,$99,$01,$3E,$85,$00,$F8,$99,$01,$3E 246 | .BYTE $04,$B8,$50,$4C,$41,$59,$9A,$01,$3D,$04,$B8,$47,$41,$4D,$45,$F0 247 | .BYTE $3A,$01,$3D,$05,$DD,$DD,$DD,$DD,$DD,$DD,$9F,$01,$DE,$F0,$3F,$01 248 | .BYTE $DE,$F0,$5A,$01,$DE,$64,$BB,$9A,$01,$DE,$64,$CB,$9A,$01,$DE,$00 249 | .BYTE $DB,$22,$DC,$00,$DF,$98,$01,$3E,$63,$E9,$02,$EC,$EC,$EF,$98,$01 250 | .BYTE $3E,$63,$F9,$02,$FC,$FC,$FF,$9B,$01,$DE,$01,$DF,$DF,$84,$02,$FD 251 | .BYTE $01,$DD,$E0,$32,$E1,$00,$E2,$22,$DD,$22,$D9,$E4,$42,$DD,$E4,$3F 252 | .BYTE $FF,$E4,$21,$46,$34,$0A,$8B,$04,$17,$32,$18,$9F,$04,$36,$9C,$04 253 | .BYTE $36,$03,$01,$18,$18,$0A,$F0,$2A,$04,$17,$3F,$46,$34,$58,$00,$46 254 | .BYTE $25,$4A,$00,$49,$83,$04,$DF,$32,$46,$02,$58,$46,$4A,$23,$8B,$9F 255 | .BYTE $04,$FD,$01,$4A,$46,$99,$04,$FF,$03,$4A,$4A,$4A,$4A,$9F,$05,$3D 256 | .BYTE $9B,$05,$3D,$9F,$05,$39,$F0,$3E,$05,$39,$05,$46,$46,$46,$46,$46 257 | .BYTE $46,$9F,$05,$DE,$F0,$3F,$05,$DE,$F0,$5A,$05,$DE,$9F,$05,$D9,$9F 258 | .BYTE $05,$D9,$9D,$05,$59,$00,$4A,$9E,$05,$58,$9F,$07,$17,$22,$46,$22 259 | .BYTE $03,$9A,$04,$DD,$04,$46,$46,$4A,$4A,$4A,$E4,$42,$46,$E4,$3F,$00 260 | .BYTE $FF 261 | _tlm_res_lz_scr6A: 262 | .WORD $2400 263 | .BYTE 1 264 | .WORD _tlm_scr6A_lz0 265 | _tlm_scr6A_lz0: 266 | .BYTE $E4,$22,$DC,$00,$00,$37,$01,$00,$02,$26,$DC,$37,$11,$27,$DC,$00 267 | .BYTE $21,$4A,$22,$12,$00,$23,$28,$DC,$66,$04,$00,$05,$86,$00,$86,$65 268 | .BYTE $05,$00,$0C,$29,$DC,$62,$14,$01,$3F,$4F,$62,$19,$86,$00,$A6,$85 269 | .BYTE $00,$A6,$00,$1C,$29,$DC,$0B,$24,$1F,$2F,$DC,$DC,$5F,$6F,$2B,$25 270 | .BYTE $26,$DC,$DC,$62,$29,$85,$00,$C6,$00,$2C,$29,$DC,$01,$34,$0F,$23 271 | .BYTE $DC,$08,$7F,$3B,$35,$DF,$58,$AC,$AD,$3A,$3B,$85,$00,$E6,$00,$3C 272 | .BYTE $29,$DC,$00,$30,$86,$00,$FF,$00,$DF,$63,$A8,$01,$DF,$30,$8C,$00 273 | .BYTE $FF,$23,$DC,$00,$31,$86,$01,$1F,$00,$DF,$63,$B8,$01,$DF,$31,$8C 274 | .BYTE $01,$1F,$22,$DC,$0A,$32,$33,$DF,$DF,$58,$59,$DF,$5A,$33,$DF,$DF 275 | .BYTE $62,$C9,$00,$5A,$87,$01,$45,$27,$DC,$00,$36,$24,$37,$6D,$60,$24 276 | .BYTE $37,$00,$38,$25,$DC,$02,$10,$27,$28,$62,$40,$6D,$70,$62,$43,$01 277 | .BYTE $27,$28,$27,$DC,$01,$27,$28,$62,$50,$6D,$80,$62,$53,$8B,$01,$9A 278 | .BYTE $62,$46,$6D,$90,$62,$49,$87,$01,$9A,$00,$60,$39,$61,$00,$62,$23 279 | .BYTE $DC,$17,$66,$49,$2A,$6D,$DC,$73,$6F,$72,$72,$79,$DC,$62,$75,$74 280 | .BYTE $DC,$79,$6F,$75,$2A,$72,$65,$DC,$74,$6F,$22,$DC,$00,$67,$84,$01 281 | .BYTE $FE,$0A,$66,$61,$72,$DC,$69,$6E,$DC,$64,$65,$70,$74,$83,$02,$17 282 | .BYTE $0A,$67,$65,$74,$DC,$61,$6E,$6F,$74,$68,$65,$72,$85,$02,$1D,$17 283 | .BYTE $6C,$6F,$61,$6E,$2E,$DC,$DC,$43,$6F,$6D,$65,$DC,$62,$61,$63,$6B 284 | .BYTE $DC,$61,$6E,$64,$DC,$73,$65,$65,$87,$02,$1B,$06,$75,$73,$DC,$77 285 | .BYTE $68,$65,$6E,$83,$02,$10,$84,$02,$31,$83,$02,$6B,$03,$68,$65,$61 286 | .BYTE $64,$87,$02,$1B,$0B,$61,$62,$6F,$76,$65,$DC,$77,$61,$74,$65,$72 287 | .BYTE $2E,$2D,$DC,$85,$02,$1D,$39,$DC,$9F,$02,$9D,$89,$02,$9D,$0D,$F0 288 | .BYTE $0C,$0F,$01,$0E,$13,$F1,$DC,$EE,$CF,$CA,$CA,$DC,$EF,$92,$02,$D5 289 | .BYTE $0C,$4C,$4F,$41,$4E,$53,$F1,$DC,$FE,$DF,$DA,$DA,$DC,$FF,$8A,$02 290 | .BYTE $95,$01,$DD,$DD,$9B,$02,$A2,$03,$DD,$DD,$CC,$CC,$9B,$02,$A2,$04 291 | .BYTE $CC,$CD,$DD,$DD,$63,$39,$64,$07,$65,$CD,$CC,$DD,$CD,$CD,$CC,$DD 292 | .BYTE $41,$DD,$CC,$00,$CC,$83,$03,$82,$04,$DD,$DD,$CD,$DD,$CC,$83,$03 293 | .BYTE $88,$01,$CC,$CC,$26,$DD,$84,$03,$97,$00,$CD,$86,$03,$9B,$84,$03 294 | .BYTE $95,$85,$03,$98,$01,$CD,$CD,$83,$03,$AF,$01,$CC,$CC,$25,$00,$01 295 | .BYTE $FF,$FF,$27,$DF,$87,$03,$C0,$07,$00,$01,$07,$1F,$01,$04,$10,$40 296 | .BYTE $23,$FF,$23,$00,$27,$DF,$8F,$03,$E0,$E4,$43,$88,$37,$08,$9E,$04 297 | .BYTE $3B,$9F,$04,$3A,$8C,$04,$3A,$03,$48,$48,$08,$08,$86,$04,$A5,$04 298 | .BYTE $08,$08,$08,$48,$48,$8D,$04,$78,$05,$48,$48,$C8,$C8,$48,$48,$86 299 | .BYTE $04,$C5,$06,$08,$48,$48,$C8,$C8,$48,$48,$8C,$04,$BA,$23,$C8,$0D 300 | .BYTE $48,$08,$48,$01,$08,$C8,$C8,$48,$08,$48,$C8,$C8,$C8,$C8,$8C,$04 301 | .BYTE $D9,$25,$C8,$01,$08,$01,$23,$C8,$07,$01,$08,$C8,$C8,$C8,$C8,$C8 302 | .BYTE $C8,$9F,$04,$FA,$8B,$04,$7A,$07,$01,$01,$08,$08,$01,$08,$08,$01 303 | .BYTE $83,$05,$0D,$08,$08,$08,$01,$01,$08,$08,$01,$08,$08,$E4,$28,$88 304 | .BYTE $95,$05,$59,$01,$08,$08,$9F,$05,$7C,$F0,$25,$05,$7C,$3B,$06,$84 305 | .BYTE $05,$DE,$22,$CB,$06,$C8,$CB,$CB,$CB,$CB,$CB,$C8,$88,$06,$03,$83 306 | .BYTE $06,$05,$22,$C8,$8B,$05,$FD,$05,$C8,$CB,$CB,$CB,$CB,$C8,$8C,$06 307 | .BYTE $0A,$00,$CB,$88,$05,$FD,$08,$CB,$CB,$C8,$C8,$CB,$CB,$CB,$CB,$C8 308 | .BYTE $8B,$06,$08,$07,$C8,$C8,$06,$88,$88,$88,$88,$06,$8F,$06,$4C,$04 309 | .BYTE $CB,$CB,$CB,$C8,$CB,$8C,$06,$58,$09,$CB,$CB,$CB,$C8,$CB,$CB,$CB 310 | .BYTE $CB,$CB,$CB,$2D,$C8,$85,$05,$FD,$39,$C8,$9F,$06,$9D,$89,$06,$9D 311 | .BYTE $00,$D8,$24,$18,$01,$D8,$C8,$23,$D8,$01,$C8,$D8,$9F,$06,$D5,$F0 312 | .BYTE $4D,$06,$95,$3A,$06,$E4,$41,$88,$87,$03,$C0,$27,$01,$88,$03,$D0 313 | .BYTE $0D,$03,$0F,$3F,$02,$08,$20,$80,$FF,$FF,$FF,$FF,$00,$00,$00,$88 314 | .BYTE $00,$23,$8F,$07,$E0,$FF 315 | _tlm_res_lz_scr6B: 316 | .WORD $2400 317 | .BYTE 1 318 | .WORD _tlm_scr6B_lz0 319 | _tlm_scr6B_lz0: 320 | .BYTE $E4,$22,$DC,$00,$00,$37,$01,$00,$02,$26,$DC,$37,$11,$27,$DC,$00 321 | .BYTE $21,$4A,$22,$12,$00,$23,$28,$DC,$66,$04,$00,$05,$86,$00,$86,$65 322 | .BYTE $05,$00,$0C,$29,$DC,$62,$14,$01,$3F,$4F,$62,$19,$86,$00,$A6,$85 323 | .BYTE $00,$A6,$00,$1C,$29,$DC,$07,$24,$1F,$2F,$DC,$DC,$5F,$6F,$2B,$86 324 | .BYTE $00,$C6,$85,$00,$C6,$00,$2C,$29,$DC,$01,$34,$0F,$23,$DC,$01,$7F 325 | .BYTE $3B,$86,$00,$E6,$85,$00,$E6,$00,$3C,$29,$DC,$00,$30,$86,$00,$FF 326 | .BYTE $06,$24,$31,$30,$30,$30,$30,$30,$8C,$00,$FF,$23,$DC,$00,$31,$86 327 | .BYTE $01,$1F,$8D,$01,$1F,$28,$DC,$07,$32,$33,$DF,$DF,$58,$59,$DF,$5A 328 | .BYTE $86,$01,$45,$87,$01,$45,$27,$DC,$00,$36,$24,$37,$6D,$60,$24,$37 329 | .BYTE $00,$38,$25,$DC,$02,$10,$27,$28,$62,$40,$6D,$70,$62,$43,$01,$27 330 | .BYTE $28,$27,$DC,$01,$27,$28,$62,$50,$6D,$80,$62,$53,$8B,$01,$9A,$62 331 | .BYTE $46,$6D,$90,$62,$49,$87,$01,$9A,$00,$60,$39,$61,$00,$62,$23,$DC 332 | .BYTE $11,$66,$48,$65,$6C,$6C,$6F,$2C,$74,$68,$69,$73,$DC,$69,$73,$DC 333 | .BYTE $74,$68,$65,$28,$DC,$00,$67,$84,$01,$FE,$29,$DC,$0F,$62,$61,$6E 334 | .BYTE $6B,$2E,$DC,$48,$6F,$77,$DC,$63,$61,$6E,$DC,$77,$65,$85,$02,$1D 335 | .BYTE $0C,$68,$65,$6C,$70,$DC,$79,$6F,$75,$3F,$DC,$DC,$49,$66,$83,$02 336 | .BYTE $47,$04,$DC,$6E,$65,$65,$64,$89,$02,$19,$07,$6D,$6F,$6E,$65,$79 337 | .BYTE $DC,$77,$65,$84,$02,$36,$07,$6C,$6F,$61,$6E,$DC,$79,$6F,$75,$8A 338 | .BYTE $02,$18,$85,$01,$0D,$05,$2E,$DC,$DC,$41,$6C,$6C,$84,$02,$50,$06 339 | .BYTE $68,$61,$76,$65,$DC,$74,$6F,$87,$02,$1B,$01,$64,$6F,$83,$02,$0D 340 | .BYTE $12,$70,$61,$79,$DC,$24,$35,$30,$30,$DC,$65,$76,$65,$72,$79,$DC 341 | .BYTE $79,$65,$61,$72,$86,$02,$1C,$0A,$66,$6F,$72,$DC,$6F,$6E,$6C,$79 342 | .BYTE $DC,$32,$31,$84,$02,$B7,$09,$73,$2E,$DC,$DC,$57,$68,$61,$74,$DC 343 | .BYTE $61,$86,$02,$9D,$12,$65,$61,$6C,$21,$DC,$59,$6F,$75,$DC,$77,$6F 344 | .BYTE $6E,$2A,$74,$DC,$66,$69,$6E,$64,$84,$02,$6F,$00,$73,$85,$02,$1D 345 | .BYTE $08,$6C,$69,$6B,$65,$DC,$74,$68,$69,$73,$86,$02,$B1,$08,$64,$61 346 | .BYTE $79,$2E,$DC,$57,$68,$61,$74,$89,$02,$9C,$83,$02,$51,$03,$73,$61 347 | .BYTE $79,$3F,$2E,$DC,$05,$67,$DC,$DC,$DD,$DD,$66,$2D,$DC,$63,$E8,$01 348 | .BYTE $DC,$DC,$63,$EC,$06,$DC,$DC,$67,$DD,$DD,$CC,$CC,$8E,$03,$42,$63 349 | .BYTE $F8,$01,$DC,$DC,$63,$FC,$04,$DC,$DC,$67,$CC,$CD,$90,$03,$40,$8C 350 | .BYTE $03,$31,$04,$CD,$CC,$DD,$CD,$63,$39,$64,$03,$65,$DD,$DD,$FF,$22 351 | .BYTE $00,$03,$FF,$FF,$00,$00,$27,$DF,$87,$03,$C0,$87,$03,$C0,$05,$FF 352 | .BYTE $00,$03,$03,$FF,$FE,$8A,$03,$C6,$00,$FF,$83,$03,$C4,$89,$03,$C6 353 | .BYTE $E4,$43,$88,$37,$08,$9E,$04,$3B,$9F,$04,$3A,$8C,$04,$3A,$03,$48 354 | .BYTE $48,$08,$08,$86,$04,$A5,$04,$08,$08,$08,$48,$48,$8D,$04,$78,$05 355 | .BYTE $48,$48,$C8,$C8,$48,$48,$86,$04,$C5,$06,$08,$48,$48,$C8,$C8,$48 356 | .BYTE $48,$8C,$04,$BA,$23,$C8,$00,$48,$86,$04,$E5,$05,$08,$48,$C8,$C8 357 | .BYTE $C8,$C8,$8C,$04,$D9,$25,$C8,$00,$08,$25,$CB,$06,$08,$C8,$C8,$C8 358 | .BYTE $C8,$C8,$C8,$92,$04,$FA,$05,$C8,$C8,$C8,$C8,$C8,$C8,$92,$05,$13 359 | .BYTE $05,$01,$01,$08,$08,$01,$08,$86,$05,$45,$07,$08,$01,$01,$08,$08 360 | .BYTE $01,$08,$08,$E4,$28,$88,$95,$05,$59,$01,$08,$08,$9F,$05,$7C,$F0 361 | .BYTE $25,$05,$7C,$3B,$06,$84,$05,$DE,$29,$CB,$06,$C8,$CB,$CB,$C8,$CB 362 | .BYTE $CB,$CB,$28,$C8,$85,$05,$FD,$29,$C8,$87,$06,$08,$85,$06,$0F,$01 363 | .BYTE $CB,$CB,$89,$05,$FD,$84,$06,$2C,$01,$C8,$C8,$89,$06,$30,$0A,$CB 364 | .BYTE $C8,$C8,$C8,$C8,$06,$88,$88,$88,$88,$06,$8C,$06,$08,$08,$CB,$CB 365 | .BYTE $CB,$CB,$C8,$CB,$CB,$CB,$C8,$8E,$06,$59,$04,$CB,$CB,$C8,$C8,$CB 366 | .BYTE $8D,$06,$69,$07,$C8,$C8,$06,$88,$88,$88,$88,$06,$91,$06,$66,$0D 367 | .BYTE $CB,$CB,$C8,$CB,$CB,$CB,$CB,$C8,$06,$88,$88,$88,$88,$06,$8B,$06 368 | .BYTE $90,$8A,$06,$84,$0E,$CB,$C8,$CB,$06,$88,$88,$88,$88,$06,$CB,$CB 369 | .BYTE $CB,$CB,$CB,$C8,$8E,$06,$AE,$02,$CB,$CB,$CB,$91,$06,$3B,$05,$CB 370 | .BYTE $CB,$CB,$CB,$CB,$C8,$91,$06,$B3,$0E,$C8,$CB,$CB,$CB,$C8,$CB,$CB 371 | .BYTE $CB,$CB,$C8,$C8,$C8,$C8,$C8,$C8,$98,$06,$14,$84,$06,$19,$22,$06 372 | .BYTE $85,$07,$4F,$9F,$07,$3B,$95,$07,$3B,$91,$07,$31,$3A,$06,$01,$88 373 | .BYTE $88,$85,$03,$C0,$01,$FF,$FF,$27,$01,$87,$07,$C0,$87,$07,$C0,$07 374 | .BYTE $FF,$01,$03,$03,$FF,$FC,$F8,$F8,$88,$07,$C8,$05,$FF,$FF,$FF,$00 375 | .BYTE $00,$00,$88,$00,$23,$FF 376 | _tlm_res_lz_scr1: 377 | .WORD $2400 378 | .BYTE 1 379 | .WORD _tlm_scr1_lz0 380 | _tlm_scr1_lz0: 381 | .BYTE $E4,$49,$DC,$00,$A0,$2D,$A1,$00,$A2,$2F,$DC,$00,$B0,$23,$DE,$05 382 | .BYTE $07,$12,$01,$10,$08,$13,$23,$DE,$00,$B2,$94,$00,$5A,$05,$47,$52 383 | .BYTE $41,$50,$68,$53,$94,$00,$75,$00,$C0,$2D,$C1,$00,$C2,$E4,$2C,$DC 384 | .BYTE $00,$C3,$33,$C4,$00,$C5,$24,$DC,$05,$D0,$D1,$D1,$D2,$DC,$D3,$33 385 | .BYTE $DD,$00,$D5,$24,$DC,$03,$D3,$80,$81,$D4,$9C,$01,$06,$01,$90,$91 386 | .BYTE $9D,$01,$25,$01,$82,$83,$9D,$01,$25,$01,$92,$93,$9D,$01,$25,$01 387 | .BYTE $84,$85,$9D,$01,$25,$01,$94,$95,$9D,$01,$25,$01,$86,$87,$9D,$01 388 | .BYTE $25,$01,$96,$97,$9D,$01,$25,$01,$88,$89,$9D,$01,$25,$01,$98,$99 389 | .BYTE $9D,$01,$25,$01,$8A,$8B,$9D,$01,$25,$01,$9A,$9B,$9D,$01,$25,$01 390 | .BYTE $DE,$DE,$9D,$01,$25,$01,$A0,$A1,$9D,$01,$25,$01,$AA,$AB,$9D,$01 391 | .BYTE $25,$05,$A2,$A3,$D4,$DC,$D3,$C6,$48,$C6,$C7,$00,$C6,$85,$01,$1C 392 | .BYTE $03,$D5,$D6,$D6,$D7,$9B,$01,$06,$24,$DC,$00,$E3,$33,$E4,$00,$E5 393 | .BYTE $E4,$62,$DC,$2F,$FF,$04,$00,$FF,$FF,$00,$00,$8B,$03,$C5,$06,$FC 394 | .BYTE $FC,$7C,$00,$FE,$FE,$BE,$8C,$03,$C4,$00,$00,$89,$03,$D3,$E4,$49 395 | .BYTE $01,$2F,$41,$90,$04,$3A,$23,$81,$25,$98,$23,$81,$9F,$04,$59,$91 396 | .BYTE $04,$59,$9E,$04,$4B,$3C,$01,$35,$18,$24,$01,$23,$81,$01,$01,$18 397 | .BYTE $33,$01,$86,$04,$FC,$01,$83,$83,$9F,$05,$05,$9D,$05,$05,$01,$03 398 | .BYTE $03,$9F,$05,$45,$9D,$05,$05,$01,$43,$43,$9F,$05,$85,$9D,$05,$05 399 | .BYTE $01,$C3,$C3,$9F,$05,$C5,$F0,$3F,$05,$C5,$F0,$5D,$05,$45,$9F,$05 400 | .BYTE $03,$9F,$05,$63,$F0,$24,$05,$43,$33,$41,$F0,$25,$04,$FC,$9F,$04 401 | .BYTE $E2,$E4,$5D,$01,$2F,$00,$00,$FF,$85,$03,$D1,$28,$00,$22,$FC,$04 402 | .BYTE $7C,$02,$FE,$FE,$3E,$8A,$07,$C8,$00,$FF,$2B,$00,$FF 403 | _tlm_res_lz_scr4: 404 | .WORD $2400 405 | .BYTE 1 406 | .WORD _tlm_scr4_lz0 407 | _tlm_scr4_lz0: 408 | .BYTE $E4,$40,$B6,$00,$A5,$3B,$A6,$03,$A7,$B6,$B6,$B5,$27,$00,$0C,$AE 409 | .BYTE $AC,$C5,$CA,$00,$C9,$C8,$C4,$C7,$C8,$AC,$C4,$CB,$26,$00,$00,$B7 410 | .BYTE $8A,$00,$5F,$0C,$BE,$BC,$D5,$DA,$00,$D9,$D8,$D4,$D7,$D8,$BC,$D4 411 | .BYTE $DB,$8A,$00,$77,$3B,$7C,$85,$00,$9E,$05,$5A,$4F,$4E,$49,$4E,$47 412 | .BYTE $33,$7C,$93,$00,$9E,$62,$21,$23,$7C,$00,$5B,$88,$00,$BA,$64,$62 413 | .BYTE $00,$5B,$26,$7C,$01,$5A,$7C,$64,$24,$8B,$00,$F7,$64,$67,$89,$01 414 | .BYTE $08,$00,$29,$62,$48,$8C,$00,$F6,$64,$6C,$89,$01,$08,$01,$71,$43 415 | .BYTE $63,$29,$01,$7C,$5B,$97,$00,$DA,$02,$72,$3D,$3E,$63,$29,$98,$01 416 | .BYTE $59,$62,$75,$00,$55,$8C,$00,$F6,$64,$0A,$89,$01,$08,$03,$21,$4F 417 | .BYTE $74,$51,$8C,$00,$F6,$01,$0F,$10,$62,$0B,$00,$4F,$88,$01,$09,$00 418 | .BYTE $72,$64,$2E,$99,$01,$58,$90,$00,$B2,$62,$11,$0A,$7C,$7C,$5B,$7C 419 | .BYTE $7C,$7C,$7C,$7C,$7C,$7C,$5A,$9F,$00,$D1,$64,$33,$84,$00,$F8,$62 420 | .BYTE $5F,$84,$00,$9E,$62,$14,$02,$7C,$7C,$5B,$33,$7C,$00,$5A,$92,$00 421 | .BYTE $9E,$63,$38,$08,$36,$37,$5B,$7C,$7C,$7C,$5F,$60,$61,$9E,$00,$9E 422 | .BYTE $85,$02,$5D,$62,$17,$85,$00,$F7,$04,$5E,$7C,$5C,$5D,$7C,$65,$3C 423 | .BYTE $00,$78,$8A,$02,$38,$0C,$1F,$20,$7C,$7C,$7C,$5B,$7C,$7C,$7C,$5E 424 | .BYTE $7C,$5C,$5D,$92,$02,$50,$64,$1A,$88,$02,$A8,$65,$43,$F0,$2B,$02 425 | .BYTE $77,$3A,$7C,$F0,$22,$00,$9E,$00,$C5,$3B,$C6,$00,$C7,$E4,$40,$B6 426 | .BYTE $E4,$3F,$7C,$E4,$40,$8A,$3D,$4A,$02,$8A,$8A,$4A,$27,$D8,$23,$CB 427 | .BYTE $00,$D8,$27,$CB,$26,$D8,$9F,$04,$5E,$83,$04,$5E,$3B,$15,$85,$04 428 | .BYTE $9E,$25,$D9,$33,$15,$93,$04,$9E,$22,$95,$84,$04,$EE,$88,$04,$BA 429 | .BYTE $05,$95,$95,$95,$95,$95,$95,$87,$04,$EB,$05,$15,$95,$95,$95,$95 430 | .BYTE $95,$9B,$04,$F7,$22,$06,$9C,$04,$F6,$06,$06,$95,$95,$95,$95,$15 431 | .BYTE $95,$98,$04,$DA,$05,$06,$06,$95,$95,$95,$95,$99,$05,$59,$01,$95 432 | .BYTE $95,$9F,$05,$35,$9D,$05,$35,$00,$95,$9D,$05,$54,$90,$04,$B2,$89 433 | .BYTE $05,$14,$03,$15,$15,$15,$95,$9F,$04,$D1,$89,$05,$D3,$22,$95,$91 434 | .BYTE $05,$FE,$8D,$04,$E5,$97,$06,$1E,$06,$95,$95,$15,$15,$15,$95,$95 435 | .BYTE $93,$06,$5D,$91,$06,$51,$88,$05,$14,$03,$95,$15,$95,$95,$92,$06 436 | .BYTE $70,$0C,$95,$95,$15,$15,$15,$95,$15,$15,$15,$95,$15,$95,$95,$95 437 | .BYTE $06,$90,$01,$95,$95,$9A,$06,$A8,$39,$15,$9F,$06,$7D,$F0,$24,$05 438 | .BYTE $DD,$3C,$4A,$E4,$40,$8A,$E4,$3F,$15,$FF 439 | _tlm_res_lz_scr3: 440 | .WORD $2400 441 | .BYTE 1 442 | .WORD _tlm_scr3_lz0 443 | _tlm_scr3_lz0: 444 | .BYTE $4F,$5B,$5C,$4F,$5C,$5B,$00,$C3,$3D,$C4,$01,$C5,$D3,$29,$00,$0E 445 | .BYTE $03,$09,$14,$19,$00,$05,$16,$01,$0C,$15,$01,$14,$09,$0F,$0E,$24 446 | .BYTE $00,$00,$D5,$8A,$00,$60,$0E,$43,$49,$54,$59,$00,$45,$76,$41,$4C 447 | .BYTE $55,$41,$54,$49,$4F,$4E,$86,$00,$7A,$3D,$DD,$03,$D5,$D3,$20,$2D 448 | .BYTE $2B,$1E,$01,$2E,$19,$8B,$00,$C2,$E0,$24,$2E,$21,$D5,$D3,$22,$50 449 | .BYTE $55,$42,$4C,$49,$43,$DC,$4F,$50,$49,$4E,$49,$4F,$4E,$1A,$DC,$53 450 | .BYTE $54,$41,$54,$49,$53,$54,$49,$43,$53,$DC,$DC,$23,$D5,$D3,$22,$2D 451 | .BYTE $DC,$00,$1A,$2C,$DC,$83,$00,$FE,$6C,$70,$01,$6D,$1A,$65,$E0,$04 452 | .BYTE $DC,$DC,$DC,$DC,$DC,$F0,$25,$00,$FC,$24,$DC,$04,$25,$DC,$22,$0E 453 | .BYTE $1C,$84,$01,$0C,$66,$E6,$02,$DC,$DC,$24,$95,$01,$3B,$62,$ED,$62 454 | .BYTE $CD,$91,$01,$57,$01,$17,$18,$95,$01,$0B,$02,$83,$81,$82,$8C,$01 455 | .BYTE $04,$68,$F0,$86,$01,$1A,$02,$DD,$83,$84,$2A,$1F,$0F,$2F,$1B,$DC 456 | .BYTE $DC,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$23,$90,$00,$9F 457 | .BYTE $0E,$22,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$DC,$23 458 | .BYTE $90,$00,$BF,$00,$1C,$63,$8C,$00,$9F,$8B,$01,$16,$6D,$60,$96,$01 459 | .BYTE $50,$89,$01,$07,$66,$A6,$8C,$01,$38,$00,$25,$F0,$20,$01,$46,$89 460 | .BYTE $01,$07,$2C,$6F,$93,$02,$7E,$69,$B0,$9B,$00,$FC,$00,$BA,$97,$02 461 | .BYTE $79,$67,$C0,$F0,$2B,$01,$39,$8B,$02,$85,$67,$C8,$87,$01,$19,$01 462 | .BYTE $24,$29,$2B,$1F,$01,$2F,$1D,$8B,$03,$62,$01,$2F,$25,$F0,$20,$00 463 | .BYTE $9F,$00,$E3,$3D,$E4,$00,$E5,$32,$FF,$23,$00,$87,$03,$CF,$04,$FF 464 | .BYTE $00,$44,$3C,$30,$83,$03,$E0,$27,$FF,$23,$C3,$23,$3F,$27,$FF,$E4 465 | .BYTE $3F,$C6,$E4,$20,$58,$3D,$98,$9F,$04,$5F,$01,$58,$58,$3D,$83,$01 466 | .BYTE $58,$58,$3D,$86,$02,$58,$58,$86,$25,$0B,$00,$05,$26,$0B,$01,$86 467 | .BYTE $05,$29,$0B,$01,$05,$05,$83,$04,$DE,$2D,$05,$8D,$05,$01,$83,$04 468 | .BYTE $DE,$2D,$04,$86,$05,$01,$00,$C5,$25,$85,$99,$04,$FE,$8E,$05,$38 469 | .BYTE $00,$8B,$23,$85,$8D,$05,$0C,$00,$0B,$9C,$05,$3B,$03,$05,$05,$05 470 | .BYTE $05,$8A,$04,$FC,$00,$0B,$99,$05,$08,$01,$86,$86,$9C,$05,$04,$0E 471 | .BYTE $83,$86,$86,$86,$86,$86,$86,$86,$86,$86,$86,$86,$86,$86,$86,$91 472 | .BYTE $05,$D0,$2D,$83,$93,$05,$B0,$2C,$86,$24,$04,$F0,$20,$05,$16,$04 473 | .BYTE $05,$05,$05,$05,$05,$94,$04,$FC,$06,$04,$04,$04,$04,$04,$04,$04 474 | .BYTE $8C,$05,$98,$00,$8B,$F0,$20,$05,$86,$89,$05,$07,$2C,$84,$03,$86 475 | .BYTE $58,$58,$86,$8B,$05,$A4,$03,$05,$05,$86,$85,$29,$04,$9B,$04,$FC 476 | .BYTE $05,$04,$05,$05,$05,$05,$05,$92,$06,$BE,$07,$04,$04,$04,$04,$04 477 | .BYTE $04,$04,$04,$97,$06,$59,$93,$05,$91,$9C,$07,$05,$3C,$86,$F0,$21 478 | .BYTE $04,$9F,$3E,$58,$3F,$00,$02,$38,$44,$08,$83,$07,$DF,$28,$00,$87 479 | .BYTE $03,$F0,$27,$00,$FF 480 | 481 | SECTION_ENDS 902, "PRG9 COMMON SCREEN DRAW AND TILEMAP DATA" 482 | 483 | SECTION_START 100 484 | 485 | _tlm_res_lz_scenario_complete: 486 | .WORD $2000 487 | .BYTE 1 488 | .WORD _tlm_lz_scenario_complete 489 | _tlm_lz_scenario_complete: 490 | .BYTE $E4,$61,$DD,$00,$A5,$3A,$A6,$00,$A7,$22,$DD,$1C,$B5,$DF,$DF,$AA 491 | .BYTE $AF,$C9,$AF,$C1,$AB,$DF,$AA,$8C,$AF,$C1,$C2,$AC,$C9,$DF,$AA,$C1 492 | .BYTE $AF,$8C,$AC,$AD,$C2,$8D,$DF,$DF,$B7,$85,$00,$7F,$16,$BA,$BF,$D9 493 | .BYTE $BF,$D1,$BB,$DF,$BA,$89,$BF,$D1,$D2,$BC,$D9,$DF,$BA,$D1,$BF,$9C 494 | .BYTE $BC,$BD,$D2,$9D,$86,$00,$9C,$29,$F9,$00,$99,$2F,$F9,$84,$00,$9E 495 | .BYTE $01,$DC,$A0,$23,$A1,$00,$A2,$85,$00,$E4,$85,$00,$E4,$86,$00,$E3 496 | .BYTE $00,$DC,$85,$00,$DE,$00,$B0,$63,$84,$01,$B2,$B0,$63,$8C,$01,$B2 497 | .BYTE $B0,$63,$C4,$02,$B2,$DC,$B0,$63,$80,$00,$B2,$87,$00,$FD,$63,$94 498 | .BYTE $01,$B2,$B0,$63,$9C,$01,$B2,$B0,$63,$D4,$02,$B2,$DC,$B0,$63,$90 499 | .BYTE $88,$01,$1C,$63,$A4,$01,$B2,$B0,$63,$AC,$01,$B2,$B0,$63,$E4,$02 500 | .BYTE $B2,$DC,$B0,$63,$A0,$88,$01,$1C,$63,$B4,$01,$B2,$B0,$63,$BC,$01 501 | .BYTE $B2,$B0,$63,$F4,$02,$B2,$DC,$B0,$63,$B0,$87,$01,$1C,$00,$C0,$23 502 | .BYTE $C1,$00,$C2,$85,$01,$84,$85,$01,$84,$86,$01,$83,$86,$00,$FD,$62 503 | .BYTE $CD,$62,$D3,$03,$DC,$DC,$28,$F3,$22,$DC,$63,$FC,$01,$DC,$DC,$63 504 | .BYTE $9C,$01,$A9,$AA,$86,$00,$FD,$03,$DC,$DC,$C7,$D6,$23,$DC,$01,$C7 505 | .BYTE $9B,$84,$01,$C8,$00,$85,$24,$DC,$03,$0F,$AC,$DC,$DC,$86,$00,$FD 506 | .BYTE $64,$D7,$01,$D1,$DC,$63,$F4,$01,$DC,$DC,$63,$F8,$23,$DC,$04,$AD 507 | .BYTE $AE,$DC,$DC,$DC,$F0,$26,$00,$DE,$63,$C0,$01,$B2,$B0,$63,$C8,$01 508 | .BYTE $B2,$B0,$63,$CC,$02,$B2,$DC,$B0,$23,$88,$88,$01,$1C,$63,$D0,$01 509 | .BYTE $B2,$B0,$63,$D8,$01,$B2,$B0,$63,$DC,$8F,$02,$35,$63,$E0,$01,$B2 510 | .BYTE $B0,$63,$E8,$01,$B2,$B0,$63,$EC,$8F,$02,$35,$63,$F0,$01,$B2,$B0 511 | .BYTE $63,$F8,$01,$B2,$B0,$63,$FC,$06,$B2,$DC,$B0,$88,$88,$88,$88,$F0 512 | .BYTE $27,$01,$7C,$00,$DC,$63,$8C,$83,$01,$F7,$02,$AF,$D6,$DC,$63,$2B 513 | .BYTE $03,$60,$61,$DC,$DC,$63,$C3,$00,$DC,$89,$01,$BD,$00,$AB,$84,$01 514 | .BYTE $D5,$00,$7C,$84,$01,$D5,$00,$6E,$29,$DC,$86,$01,$BE,$63,$D6,$07 515 | .BYTE $DC,$DC,$85,$86,$88,$89,$DC,$DC,$63,$F0,$8F,$02,$F5,$06,$DA,$DB 516 | .BYTE $CE,$CF,$DC,$DC,$8A,$62,$9D,$06,$DC,$DC,$DC,$F4,$F5,$F6,$F7,$8B 517 | .BYTE $02,$F6,$00,$C5,$3A,$C6,$00,$C7,$E4,$60,$DD,$32,$FF,$00,$42,$22 518 | .BYTE $00,$87,$03,$CF,$0F,$FF,$81,$24,$18,$42,$00,$00,$00,$00,$FF,$FF 519 | .BYTE $FF,$FF,$FF,$FF,$FF,$8F,$03,$DF,$00,$FF,$E4,$61,$81,$3C,$CA,$83 520 | .BYTE $04,$5F,$01,$01,$01,$25,$00,$02,$01,$00,$01,$86,$04,$86,$00,$00 521 | .BYTE $84,$04,$8C,$22,$01,$9F,$04,$7E,$84,$04,$7E,$29,$80,$00,$01,$2F 522 | .BYTE $80,$04,$CA,$81,$81,$81,$CA,$3A,$01,$86,$04,$7E,$23,$53,$85,$05 523 | .BYTE $03,$87,$05,$03,$04,$01,$53,$53,$53,$53,$9F,$04,$FC,$F0,$3F,$04 524 | .BYTE $FC,$01,$01,$01,$F0,$25,$04,$DE,$25,$06,$01,$01,$01,$83,$05,$A8 525 | .BYTE $00,$01,$23,$03,$07,$01,$01,$06,$06,$06,$06,$06,$06,$88,$05,$7D 526 | .BYTE $08,$06,$06,$01,$01,$01,$01,$06,$06,$01,$88,$05,$C3,$02,$01,$06 527 | .BYTE $06,$8F,$05,$9B,$10,$06,$06,$06,$06,$01,$01,$03,$03,$03,$03,$01 528 | .BYTE $01,$01,$01,$06,$06,$01,$F0,$27,$05,$7C,$F0,$9F,$05,$04,$00,$01 529 | .BYTE $23,$02,$86,$05,$AF,$25,$05,$06,$01,$01,$06,$06,$06,$06,$01,$9B 530 | .BYTE $05,$BD,$91,$06,$B9,$09,$02,$02,$02,$02,$01,$01,$03,$03,$03,$03 531 | .BYTE $9B,$06,$F5,$8C,$07,$10,$00,$CA,$F0,$22,$04,$5F,$E4,$5D,$81,$32 532 | .BYTE $00,$87,$07,$BF,$84,$07,$BF,$0B,$42,$18,$24,$81,$00,$00,$00,$00 533 | .BYTE $00,$00,$00,$00,$8F,$07,$DC,$23,$00,$FF 534 | 535 | SECTION_ENDS 100, "TLM 'SCENARIO COMPLETE'" 536 | 537 | BANK_END F6,$A000 538 | -------------------------------------------------------------------------------- /macroses.inc: -------------------------------------------------------------------------------- 1 | ;-------------C-O-N-S-T-A-N-T-S----------------- 2 | 3 | DEBUG EQU 1 4 | 5 | PRG0 EQU $F0 6 | PRG1 EQU $F1 7 | PRG2 EQU $F2 8 | PRG3 EQU $F3 9 | PRG4 EQU $F4 10 | PRG5 EQU $F5 11 | PRG6 EQU $F6 12 | PRG7 EQU $F7 13 | PRG8 EQU $F8 14 | PRG9 EQU $F9 15 | PRGA EQU $FA 16 | PRGB EQU $FB 17 | PRGC EQU $FC 18 | PRGD EQU $FD 19 | SRAM EQU $00 20 | 21 | ;--------------------A-P-U---------------------- 22 | ; idxes flags (old) 23 | _SE_IDX_CLICK EQU $0001 ; $0001 - regular click 24 | _SE_IDX_ERROR EQU $0002 ; $0002 - error buzzer 25 | _SE_IDX_SBUILD EQU $0003 ; $0004 - smal build sound 26 | _SE_IDX_LBUILD EQU $0004 ; $0008 - large build sound 27 | _SE_IDX_ALERT EQU $0005 ; $0010 - alert buzzer 28 | _SE_IDX_ROLLOUT EQU $0006 ; $0020 - menu open 29 | _SE_IDX_ROLLIN EQU $0007 ; $0040 - menu close 30 | _SE_IDX_0080 EQU $0008 ; $0080 - *unused* click 31 | _SE_IDX_MONSTER EQU $0100 ; $0100 ; monster dpcm 32 | _SE_IDX_TRAFFIC EQU $0200 ; $0200 ; traffic report dpcm 33 | _SE_IDX_DESTROY EQU $0300 ; $0400 ; explode/destroy 34 | _SE_IDX_BULLDOZE EQU $0400 ; $0800 ; bulldoze sound 35 | _SE_IDX_1000 EQU $0500 ; $1000 ; *unused* alert 36 | _SE_IDX_BCLICK EQU $0600 ; $2000 ; button press 37 | _SE_IDX_TORNADO EQU $0700 ; $3000 ; tornado sound 38 | _SE_IDX_SELECT EQU $0800 ; $4000 ; selection menus sound 39 | _SE_IDX_8000 EQU $0900 ; $8000 ; *unused* cancel 40 | 41 | MAC APUA_SE 42 | #if {1}<$100 43 | LDA #{1} 44 | STA _apu_se_idx_req 45 | #else 46 | LDA #[{1}>>8] 47 | STA _apu_se_idx_req+1 48 | #endif 49 | ENDM 50 | 51 | MAC APUX_SE 52 | #if {1}<$100 53 | LDX #{1} 54 | STX _apu_se_idx_req 55 | #else 56 | LDX #[{1}>>8] 57 | STX _apu_se_idx_req+1 58 | #endif 59 | ENDM 60 | 61 | ; idx flags 62 | _MUS_IDX_TITLE0 EQU $01 ; $01 63 | _MUS_IDX_TITLE1 EQU $02 ; $02 64 | _MUS_IDX_SETUP EQU $03 ; $04 65 | _MUS_IDX_VILLAGE0 EQU $04 ; $08 66 | _MUS_IDX_VILLAGE1 EQU $05 ; $10 67 | _MUS_IDX_TOWN EQU $06 ; $20 68 | _MUS_IDX_CITY EQU $07 ; $41 69 | _MUS_IDX_CAPITAL EQU $08 ; $42 70 | _MUS_IDX_METROPOLIS EQU $09 ; $44 71 | _MUS_IDX_MEGAPOLIS0 EQU $0A ; $48 72 | _MUS_IDX_MEGAPOLIS1 EQU $0B ; $50 73 | _MUS_IDX_NOTICE0 EQU $0C ; $60 74 | _MUS_IDX_NOTICE1 EQU $0D ; $40 75 | _MUS_IDX_ALERT0 EQU $0E ; $21 76 | _MUS_IDX_ALERT1 EQU $0F ; $22 77 | _MUS_IDX_STOP EQU $80 78 | 79 | ;------------S-T-R-U-C-T-U-R-E-S---------------- 80 | 81 | MAC _tfix16_16 82 | {1} SET . 83 | {1}.FRAC .WORD 0 84 | {1}.INT .WORD 0 85 | ENDM 86 | 87 | MAC _tfix8_8 88 | {1} SET . 89 | {1}.FRAC .BYTE 0 90 | {1}.INT .BYTE 0 91 | ENDM 92 | 93 | 94 | MAC _tpos 95 | {1} SET . 96 | {1}._COL: .BYTE 0 97 | {1}._ROW: .BYTE 0 98 | ENDM 99 | 100 | R_AREA_BIDX EQU 0 101 | C_AREA_BIDX EQU 1 102 | I_AREA_BIDX EQU 2 103 | 104 | MAC _trci 105 | {1} SET . 106 | {1}._R: .BYTE 0 107 | {1}._C: .BYTE 0 108 | {1}._I: .BYTE 0 109 | ENDM 110 | 111 | R_AREA_WIDX EQU 0 112 | C_AREA_WIDX EQU 2 113 | I_AREA_WIDX EQU 4 114 | 115 | MAC _trciw 116 | {1} SET . 117 | {1}._R: .WORD 0 118 | {1}._C: .WORD 0 119 | {1}._I: .WORD 0 120 | ENDM 121 | 122 | MAC _trcifix8_8 123 | {1} SET . 124 | {1}.FRAC SET . 125 | {1}.INT SET [.+1] 126 | _tfix8_8 {1}._R 127 | _tfix8_8 {1}._C 128 | _tfix8_8 {1}._I 129 | ENDM 130 | 131 | MAC _tcity 132 | {1} SET . 133 | {1}._name: .BYTE 0,0,0,0,0,0,0,0,0,0,0 134 | {1}._sister_name: .BYTE 0,0,0,0,0,0,0,0,0,0,0 135 | {1}._bank_name: .BYTE 0,0,0,0,0,0,0,0,0,0,0 136 | ; REDUNDANT, remove by now, free some space for more savestates 137 | ;{1}._unused_name3: .BYTE 0,0,0,0,0,0,0,0,0,0,0 138 | ;{1}._unused_name4: .BYTE 0,0,0,0,0,0,0,0,0,0,0 139 | ; 140 | ; FIX, new vars for SAVE/LOAD state proper work 141 | ; moved here to prevent erasing at the game init 142 | {1}._cur_game_mode: .BYTE 0 143 | {1}._scenario_idx: .BYTE 0 144 | ; FIX, difficult workaround don't need anymore 145 | {1}._difficult: .BYTE 0 146 | ; - 147 | {1}._scenarios_clear_flags: .BYTE 0 148 | {1}._all_scenarios_are_clear_ram_flag: .BYTE 0 149 | _trcifix8_8 {1}._level 150 | _trci {1}._delta 151 | _tfix8_8 {1}._traf_lvl_avr 152 | _tfix8_8 {1}._land_val_avr 153 | _tfix8_8 {1}._crime_lvl_avr 154 | _tfix8_8 {1}._poll_lvl_avr 155 | {1}._city_type: .BYTE 0 156 | {1}._score: .WORD 0 157 | {1}._money: .BYTE 0,0,0 158 | {1}._cur_year: .WORD 0 159 | {1}._cur_month: .BYTE 0 160 | {1}._cur_week: .BYTE 0 161 | {1}._tax_rate: .BYTE 0 162 | {1}._game_flags: .BYTE 0 163 | ; bit0 - auto buldozer 164 | ; bit1 - auto budget (unused) 165 | ; bit2 - auto goto 166 | ; bit3 - music on/off 167 | ; bit4 - debug mode (free construction) 168 | {1}._game_speed: .BYTE 0 169 | {1}._events_flags: .BYTE 0,0,0,0 170 | {1}._year_to_bank: .WORD 0 171 | {1}._year_to_expo: .WORD 0 172 | {1}._year_to_liberty: .WORD 0 173 | {1}._presents_list: .BYTE 0,0,0,0 174 | {1}._history_list: .BYTE 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 175 | {1}._bank_flags: .BYTE 0 176 | ; bit0 - bank built, wait for loan message 177 | ; bit6 - money loaned, wait for end of period 178 | ; bit7 - loan message enabled, may loan now 179 | {1}._tax_year_sum: .WORD 0 180 | {1}._loan_period: .BYTE 0 181 | ; FIX, reinitialized before game, or erased or loadable now 182 | {1}._didaster_delay: .BYTE 0 183 | {1}._disaster_end: .BYTE 0 184 | _tpos {1}._wnd_pos 185 | {1}._menu_pos .BYTE 0,0,0,0,0,0,0,0,0,0,0,0 186 | {1}_size SET [.-{1}] 187 | ENDM 188 | 189 | MAC _treq 190 | {1} SET . 191 | {1}._stadium: .BYTE 0 192 | {1}._airport: .BYTE 0 193 | {1}._seaport: .BYTE 0 194 | ENDM 195 | 196 | DEVELOPED_WIDX EQU 0 197 | UNDEVELOPED_WIDX EQU 2 198 | OTHER_WIDX EQU 4 199 | 200 | MAC _tdev 201 | {1} SET . 202 | {1}._developed: .WORD 0 203 | {1}._undeveloped: .WORD 0 204 | {1}._other: .WORD 0 205 | {1}._total: .WORD 0 206 | ENDM 207 | 208 | MAC _tobj6w 209 | {1} SET . 210 | {1}._COL SET . 211 | {1}._ROW SET [.+1] 212 | _tpos {1}._heli 213 | _tpos {1}._plane 214 | _tpos {1}._ship 215 | _tpos {1}._train 216 | _tpos {1}._monster 217 | _tpos {1}._tornado 218 | ENDM 219 | 220 | MAC _tobj4b 221 | {1} SET . 222 | {1}._heli: .BYTE 0 223 | {1}._plane: .BYTE 0 224 | {1}._ship: .BYTE 0 225 | {1}._train: .BYTE 0 226 | ENDM 227 | 228 | MAC _tfund8 229 | {1} SET . 230 | {1}._fire: .BYTE 0 231 | {1}._police: .BYTE 0 232 | {1}._trans: .BYTE 0 233 | {1}._education: .BYTE 0 234 | {1}._unk: .BYTE 0 235 | ENDM 236 | 237 | MAC _tfund16 238 | {1} SET . 239 | {1}._tax: .WORD 0 240 | {1}._fire: .WORD 0 241 | {1}._police: .WORD 0 242 | {1}._trans: .WORD 0 243 | {1}._education: .WORD 0 244 | ENDM 245 | 246 | MAC _tsprarg 247 | {1} SET . 248 | {1}._attr: .BYTE 0 249 | {1}._idx: .BYTE 0 250 | _tpos {1}._pos 251 | {1}._clip: .BYTE 0 252 | ENDM 253 | 254 | MAC _tsprargraw 255 | {1} SET . 256 | {1}._idx: .BYTE 0 257 | _tpos {1}._pos 258 | ENDM 259 | 260 | MAC _tgraph 261 | {1} SET . 262 | .BYTE 0,0,0,0,0,0,0,0,0,0 263 | ENDM 264 | 265 | MAC _tyear 266 | {1} SET . 267 | _tgraph {1}._R 268 | _tgraph {1}._C 269 | _tgraph {1}._I 270 | _tgraph {1}._pollution 271 | _tgraph {1}._money 272 | _tgraph {1}._crime 273 | ENDM 274 | 275 | MAC _tgraphs 276 | {1} SET . 277 | _tyear {1}._10y 278 | _tyear {1}._100y 279 | {1}_size SET [.-{1}] 280 | ENDM 281 | 282 | MAC _tarray 283 | {1} SET . 284 | DS {2} 285 | {1}_end SET . 286 | {1}_size SET [{1}_end-{1}] 287 | ENDM 288 | 289 | ;---------G-A-M-E--S-P-E-C-I-F-I-C-------------- 290 | 291 | ; \t\tSTX\t\t_MMC5_MUL1\n\t\tSTA\t\t_MMC5_MUL0\n\t\tLDA\t\t_MMC5_MUL0\n\t\tLDX\t\t_MMC5_MUL1\n 292 | ; \t\tMULXA\n 293 | ; 294 | MAC MULXA 295 | STX _MMC5_MUL1 296 | STA _MMC5_MUL0 297 | LDA _MMC5_MUL0 298 | LDX _MMC5_MUL1 299 | ENDM 300 | 301 | ; \t\tSTA\t\t_MMC5_MUL1\n\t\tSTX\t\t_MMC5_MUL0\n\t\tLDX\t\t_MMC5_MUL0\n\t\tLDA\t\t_MMC5_MUL1\n 302 | ; \t\tMULXA\n 303 | ; 304 | MAC MULAX 305 | STA _MMC5_MUL1 306 | STX _MMC5_MUL0 307 | LDX _MMC5_MUL0 308 | LDA _MMC5_MUL1 309 | ENDM 310 | 311 | ; \t\tSTY\t\t_MMC5_MUL1\n\t\tSTA\t\t_MMC5_MUL0\n\t\tLDA\t\t_MMC5_MUL0\n\t\tLDY\t\t_MMC5_MUL1\n 312 | ; \t\tMULYA\n 313 | ; 314 | MAC MULYA 315 | STY _MMC5_MUL1 316 | STA _MMC5_MUL0 317 | LDA _MMC5_MUL0 318 | LDY _MMC5_MUL1 319 | ENDM 320 | 321 | ; \t\tSTA\t\t_mmc5_mul1_shadow\n\t\tSTA\t\t_MMC5_MUL1\n\t\tLDA\t\t(.*)\n\t\tSTA\t\t_mmc5_mul0_shadow\n\t\tSTA\t\t_MMC5_MUL0\n 322 | ; \t\tMULAI\t\1\n 323 | ; 324 | MAC MULAI 325 | STA _mmc5_mul1_shadow 326 | STA _MMC5_MUL1 327 | LDA {0} 328 | STA _mmc5_mul0_shadow 329 | STA _MMC5_MUL0 330 | ENDM 331 | 332 | MAC FJSRA 333 | JSR _farcall_argsAXY_safe 334 | .BYTE {2},{3} 335 | .WORD {1} 336 | ENDM 337 | 338 | MAC FJSR 339 | JSR _farcall_argsXY_safe 340 | .BYTE {2},{3} 341 | .WORD {1} 342 | ENDM 343 | 344 | ; \t\tLDX\t\t#<\[(.*)\]\n\t\tLDY\t\t#>\[\1\]\n\t\tJSR\t\t(.*)\n 345 | ; \t\tJSRXY\t\2,\1\n 346 | ; 347 | MAC JSRXY 348 | LDX #<[{2}] 349 | LDY #>[{2}] 350 | JSR {1} 351 | ENDM 352 | 353 | ; \t\tLDX\t\t#<\[(.*)\]\n\t\tLDY\t\t#>\[\1\]\n\t\tJSR\t\t(.*)\n 354 | ; \t\tJSRXY\t\2,\1\n 355 | ; 356 | MAC JMPXY 357 | LDX #<[{2}] 358 | LDY #>[{2}] 359 | JMP {1} 360 | ENDM 361 | 362 | ; \t\tLDX\t\t#<\[(.*)\]\n\t\tLDY\t\t#>\[\1\]\n 363 | ; \t\tLDXY\t\1\n 364 | ; 365 | MAC LDXY 366 | LDX #<[{1}] 367 | LDY #>[{1}] 368 | ENDM 369 | 370 | ; \t\tPUSHB\t(.*)\n\t\tPUSHB\t(.*)\n\t\tJSR\t\t_mmc5_mul8to8\n\t\tPOPB\t(.*)\n\t\tPOPB\t\3\+1\n 371 | ; \t\tMMULB8\t\3,\1,\2\n 372 | ; 373 | ; store-multiply, input args are 8bit, result is 16bit 374 | ; 375 | MAC MMULB8 376 | PUSHB {2} 377 | PUSHB {3} 378 | JSR _mmc5_mul8to8 379 | POPB {1} 380 | POPB {1}+1 381 | ENDM 382 | 383 | MAC MULA8 384 | ENDM 385 | 386 | NONE EQU -1 387 | 388 | ;\t\tLDA\t\t(.*)\n\t\tLSR\n\t\tCLC\n\t\tADC\t\t(.*)\n\t\tCMP\t\t(.*)\n\t\tBCC\t\t(.*)\n\t\tSBC\t\t\3\n\4:\n\t\tSTA\t\t(.*)\n 389 | ;\t\tCIADDB\t\5,\1,\2,NONE,\3\n 390 | ; 391 | ; add mem to mem with extra immediate, clamp/wrap and store 392 | ; 393 | MAC CIADDB 394 | LDA {2} 395 | LSR 396 | CLC 397 | #if {3}!=NONE 398 | ADC {3} 399 | #endif 400 | #if {4}!=NONE 401 | ADC {4} 402 | #endif 403 | CMP {5} 404 | BCC .1 405 | SBC {5} 406 | .1: 407 | STA {1} 408 | ENDM 409 | 410 | ; 411 | MAC PPUQSTART 412 | LDX _ppu_queue_pos_head 413 | ENDM 414 | 415 | MAC PPUQEND 416 | STX _ppu_queue_pos_head 417 | ENDM 418 | 419 | MAC EXTQSTART 420 | LDX _extnt_queue_pos_head 421 | ENDM 422 | 423 | MAC EXTQEND 424 | STX _extnt_queue_pos_head 425 | ENDM 426 | 427 | ;\t\tSTA\t\t_ppu_queue_buf\,X\n\t\tINX\n 428 | ;\t\tPPUQMOVA\n 429 | ; 430 | ; TODO: macrocify non-standart usage of such opcodes by rearrange 431 | ; to the regular pattern types without logic changes 432 | ; 433 | MAC PPUQMOVA 434 | STA _ppu_queue_buf,X 435 | INX 436 | ENDM 437 | 438 | OP_NOP EQU -1 439 | OP_ORA EQU 1 440 | OP_AND EQU 2 441 | 442 | MAC PPUQMOVB 443 | LDA {1} 444 | #if {2}==OP_ORA 445 | ORA {3} 446 | #endif 447 | #if {2}==OP_AND 448 | AND {3} 449 | #endif 450 | STA _ppu_queue_buf,X 451 | INX 452 | ENDM 453 | 454 | MAC EXTQMOVA 455 | STA _extnt_queue_buf,X 456 | INX 457 | ENDM 458 | 459 | OP_NOP EQU -1 460 | OP_ORA EQU 1 461 | OP_AND EQU 2 462 | OP_ADD EQU 3 463 | 464 | MAC EXTQMOVB 465 | LDA {1} 466 | #if {2}==OP_ORA 467 | ORA {3} 468 | #endif 469 | #if {2}==OP_AND 470 | AND {3} 471 | #endif 472 | #if {2}==OP_ADD 473 | CLC 474 | ADC {3} 475 | #endif 476 | STA _extnt_queue_buf,X 477 | INX 478 | ENDM 479 | 480 | ; \t\tLDA\t\t(.*)\n\t\tSEC\n\t\tSBC\t\t(.*)\n\t\tCMP\t\t(.*)\n\t\tBCS\t\t(.*)\n\t\tSTA\t\t(.*)\n\t\tLDA\t\t\3\n\t\tSEC\n\t\tSBC\t\t\5\n\t\tSTA\t\t(.*)\n\t\tBNE\t\t(.*)\n\4\:\n\t\tLDA\t\t\3\n\t\tSTA\t\t\5\n\t\tLDA\t\t\#\$00\n\t\tSTA\t\t\6\n\7\:\n 481 | ; \t\tWRAPB\t\5\,\6\,\2\,\3\,\1\n 482 | ; 483 | ; usage: WRAPB LINELEN,WRAPLEN,POS,WIDTH,BUFLEN 484 | ; \5 \6 \2 \3 \1 485 | ; {1} {2} {3} {4} {5} 486 | ; 487 | MAC WRAPB 488 | LDA {5} ; \1 489 | SEC 490 | SBC {3} ; \2 491 | CMP {4} ; \3 492 | BCS .1 ; ORIGINAL: we check here if line is clamped, but 493 | BEQ .1 ; we will get here also if the size is exactly eaqual 494 | STA {1} ; \5 ; ant thus recalc values by hand... there is only one 495 | LDA {4} ; \3 ; place in bank D, that does BEQ check 496 | SEC ; FIX: let's get the same for all such places. 497 | SBC {1} ; \5 498 | STA {2} ; \6 499 | BNE .2 500 | .1: 501 | LDA {4} ; \3 502 | STA {1} ; \5 503 | LDA #$00 504 | STA {2} ; \6 505 | .2: 506 | ENDM 507 | 508 | ; \t\tLDA\t\t(.*)\n\t\tBEQ\t\t(.*)\n\t\tSTA\t\t(.*)\n\t\tLDA\t\t\#\$00\n\t\tSTA\t\t\1\n 509 | ; \t\tDO_WRAP\t\3,\1,\2\n 510 | ; 511 | ; 512 | MAC DO_WRAP 513 | LDA {2} 514 | BEQ {3} 515 | STA {1} 516 | LDA #$00 517 | STA {2} 518 | ENDM 519 | 520 | ; \t\tCLC\n\t\tADC\t\t(.*)\n\t\tCMP\t\t(.*)\n\t\tBCC\t\t(.*)\n\t\tSBC\t\t(.*)\n\t\tSTA\t\t(.*)\n\t\tLDA\t\t(.*)\n\t\tSEC\n\t\tSBC\t\t\5\n\t\tSTA\t\t(.*)\n\t\tBNE\t\t(.*)\n\3\:\n\t\tLDA\t\t\6\n\t\tSTA\t\t\7\n\t\tLDA\t\t\#\$00\n\t\tSTA\t\t\5\n\8\:\n 521 | ; \t\tWRAPA\t\7\,\5\,\6\,\2\n 522 | ; 523 | ; usage: WRAPA LINELEN,WRAPLEN,MAXLEN,BUFLEN 524 | ; \7 \5 \6 \2 525 | ; {1} {2} {3} {4} 526 | ; 527 | ; the same as WRAPA, but only for constant parameters, 528 | ; however, WRAPB can be used with constant parameters as well. 529 | ; 530 | ; TODO: check speed and size, decide wether to keep both methods, or use one 531 | ; for all cases 532 | ; 533 | MAC WRAPA 534 | #if {3}>2 535 | CLC 536 | ADC {3}-1 ; \6-1 537 | CMP {4} ; \2 538 | BCC .1 539 | SBC {4}-1 ; \2-1 540 | STA {2} ; \5 541 | LDA {3} ; \6 542 | SEC 543 | SBC {2} ; \5 544 | STA {1} ; \7 545 | BNE .2 546 | .1: 547 | LDA {3} ; \6 548 | STA {1} ; \7 549 | LDA #$00 550 | STA {2} ; \5 551 | .2: 552 | #else 553 | CMP {4}-1 554 | BNE .1 555 | LDA {3}-1 556 | STA {1} 557 | STA {2} 558 | BNE .2 559 | .1: 560 | LDA {3} 561 | STA {1} 562 | LDA #$00 563 | STA {2} 564 | .2: 565 | #endif 566 | ENDM 567 | 568 | 569 | 570 | ; \t\tLDA\t\t(.*)\n\t\tLDX\t\t(.*)\n\t\tMULXA\n\t\tCLC\n\t\tADC\t\t(.*)\n\t\tSTA\t\t(.*)\n\t\tTXA\n\t\tADC\t\t(.*)\n\t\tSTA\t\t(.*)\n 571 | ; \t\tBUFPOS\t\4\,\3\,\1\,\2\,\5\t\; DST=\(\1*\2+\3\)+\500\n 572 | ; 573 | ; usage: BUFPOS DST,X,Y,WIDTH,PAGE 574 | ; 4 3 1 2 5 575 | ; 576 | MAC BUFPOS 577 | #if {5}==[[_city_map>>8]&$FF] 578 | LDX {3} 579 | LDA _city_map_row_pos_list_lo,X 580 | CLC 581 | ADC {2} 582 | STA {1} 583 | LDA _city_map_row_pos_list_hi,X 584 | ADC #$00 585 | STA {1}+1 586 | #else 587 | LDA {3} ; 1 y 588 | LDX {4} ; 2 width 589 | MULXA 590 | CLC 591 | ADC {2} ; 3 x 592 | #if {5}!=$00 593 | STA {1} ; 4 dst 594 | TXA 595 | ADC {5} ; 5 page 596 | STA {1}+1 ; 6 dst+1 597 | #else 598 | BCC .1 599 | INX 600 | .1: 601 | STA {1} 602 | STX {1}+1 603 | #endif 604 | #endif 605 | ENDM 606 | 607 | ; tmp game specific, will optimize next iteration 608 | ; \t\tLDA\t\t_map_bg_anim_counter\n\t\tAND\t\t\#\$03\n\t\tASL\n\t\tSTA\t\t_ptr0\n\t\tTXA\n\t\tASL\n\t\tASL\n\t\tASL\n\t\tORA\t\t_ptr0\n\t\tTAX\n\t\tLDA\t\t([^\,]*)\,X\n\t\tSTA\t\tword_6C\+1\n\t\tINX\n\t\tLDA\t\t\1\,X\n\t\tSTA\t\tword_6C\n\t\tSEC\n 609 | ; \t\tLDA\t\t_map_bg_anim_counter\n\t\tAND\t\t\#\$01\n\t\tASL\n\t\tSTA\t\t_ptr0\n\t\tTXA\n\t\tASL\n\t\tASL\n\t\tORA\t\t_ptr0\n\t\tTAX\n\t\tLDA\t\t([^\,]*)\,X\n\t\tSTA\t\tword_6C\+1\n\t\tINX\n\t\tLDA\t\t\1\,X\n\t\tSTA\t\tword_6C\n\t\tSEC\n 610 | ; ANIM_FETCH , 611 | ; 612 | 613 | MAC ANIM_FETCH 614 | LDA _map_bg_anim_counter 615 | AND #{2} 616 | ASL 617 | STA _ptr0 618 | TXA 619 | #if {2}=$01 620 | ASL 621 | ASL 622 | #endif 623 | #if {2}=$03 624 | ASL 625 | ASL 626 | ASL 627 | #endif 628 | ORA _ptr0 629 | TAX 630 | LDA {1},X 631 | STA word_6C+1 632 | INX 633 | LDA {1},X 634 | STA word_6C 635 | SEC 636 | ENDM 637 | 638 | ;-----------------C-O-M-M-O-N------------------- 639 | 640 | MAC BANK_START 641 | CUR_PRG_BANK SET {1} 642 | CUR_BANK_START SET . 643 | ECHO "BANK",CUR_PRG_BANK," ORG ",[CUR_BANK_START>>12],"{" 644 | ENDM 645 | 646 | MAC BANK_END 647 | _bank{1}_free SET [{2}-.] 648 | #if ${1}==$F0 649 | _total_free SET _bank{1}_free 650 | #else 651 | _total_free SET _total_free+_bank{1}_free 652 | #endif 653 | #if .>{2} 654 | ; ECHO "BANK",CUR_PRG_BANK,"[ org =",[CUR_BANK_START>>12]," s =",[.-CUR_BANK_START],"]","EXCEEDED =",[0-_bank{1}_free] 655 | ECHO "} s =",[.-CUR_BANK_START],"EXCEEDED =",[0-_bank{1}_free] 656 | #else 657 | ; ECHO "BANK",CUR_PRG_BANK,"[ org =",[CUR_BANK_START>>12]," s =",[.-CUR_BANK_START],"]","FREE =",_bank{1}_free 658 | ECHO "} s =",[.-CUR_BANK_START],"FREE =",_bank{1}_free 659 | #endif 660 | #if .<{2}-1 661 | ORG {2}-1 662 | .BYTE $FF 663 | #endif 664 | ENDM 665 | 666 | MAC SECTION_START 667 | _{1}_start SET . 668 | ENDM 669 | 670 | MAC SECTION_END 671 | _{1}_end SET . 672 | ECHO " * block =",_{1}_end-_{1}_start,"[",${1},"]" 673 | ENDM 674 | 675 | MAC SECTION_ENDS 676 | _{1}_end SET . 677 | ECHO " * block =",_{1}_end-_{1}_start,"[",{2},"]" 678 | ENDM 679 | 680 | MAC LAST_BANK_END 681 | _bank{1}_free SET [{2}-.-6] 682 | _total_free SET _total_free+_bank{1}_free 683 | #if .>[{2}-6] 684 | ; ECHO "BANK",CUR_PRG_BANK,"[ s =",[.-CUR_BANK_START],"]","EXCEEDED =",[0-_bank{1}_free] 685 | ECHO "} s =",[.-CUR_BANK_START],"EXCEEDED =",[0-_bank{1}_free] 686 | #else 687 | ; ECHO "BANK",CUR_PRG_BANK,"[ s =",[.-CUR_BANK_START],"]","FREE =",_bank{1}_free 688 | ECHO "} s =",[.-CUR_BANK_START],"FREE =",_bank{1}_free 689 | #endif 690 | ECHO "-------------"; 691 | ECHO "total free =",_total_free 692 | ECHO "" 693 | ORG {2}-6 694 | .WORD NMI 695 | .WORD RESET 696 | .WORD IRQ 697 | ENDM 698 | 699 | MAC SWITCH 700 | JSR _switch 701 | _SW_START SET . 702 | ENDM 703 | 704 | MAC SW_PTR 705 | {1}_sidx SET [[. - _SW_START] >> 1] 706 | .WORD {1} 707 | ENDM 708 | 709 | ;---------------A-R-I-T-H-M--------------------- 710 | 711 | MAC NEGA 712 | EOR #$FF 713 | CLC 714 | ADC #$01 715 | ENDM 716 | 717 | ; \t\tLDA\t\t([^\,^\n]*)\n\t\tPHA\n 718 | ; \t\tPUSHB\t\1\n 719 | ; 720 | MAC PUSHB 721 | LDA {1} 722 | PHA 723 | ENDM 724 | 725 | MAC PUSHWI 726 | PUSHB #[[{1}>>8]&$FF] 727 | PUSHB #[[{1}>>0]&$FF] 728 | ENDM 729 | 730 | MAC PUSHW 731 | PUSHB {1}+1 732 | PUSHB {1} 733 | ENDM 734 | 735 | ; \t\tPLA\n\t\tSTA\t\t([^\,^\n]*)\n 736 | ; \t\tPOPB\t\1\n 737 | ; 738 | MAC POPB 739 | PLA 740 | STA {1} 741 | ENDM 742 | 743 | MAC POPW 744 | POPB {1} 745 | POPB {1}+1 746 | ENDM 747 | 748 | MAC POPD 749 | POPB {1} 750 | POPB {1}+1 751 | POPB {1}+2 752 | ENDM 753 | 754 | MAC POPADDD 755 | PLA 756 | CLC 757 | ADC {2} 758 | STA {1} 759 | PLA 760 | ADC {2}+1 761 | STA {1}+1 762 | PLA 763 | ADC {2}+2 764 | STA {1}+2 765 | ENDM 766 | 767 | ; \t\tLDA\t\t(.*)\n\t\tSTA\t\t(.*)\n\t\tLDA\t\t\1\+1\n\t\tSTA\t\t\2\+1\n 768 | ; \t\tMOVW\t\2,\1\n 769 | ; 770 | MAC MOVW 771 | LDA {2} 772 | STA {1} 773 | LDA {2}+1 774 | STA {1}+1 775 | ENDM 776 | 777 | MAC MOVD 778 | LDA {2} 779 | STA {1} 780 | LDA {2}+1 781 | STA {1}+1 782 | LDA {2}+2 783 | STA {1}+2 784 | ENDM 785 | 786 | ; \t\tLDA\t\t#<\[(.*)\]\n\t\tSTA\t\t(.*)\n\t\tLDA\t\t#>\[\1\]\n\t\tSTA\t\t\2\+1\n 787 | ; \t\tMOVWO\t\2,\1\n 788 | ; 789 | MAC MOVWO 790 | LDA #<[{2}] 791 | STA {1} 792 | LDA #>[{2}] 793 | STA {1}+1 794 | ENDM 795 | 796 | ; \t\tLDA\t\t#\$(..)\n\t\tSTA\t\t(.*)\n\t\tLDA\t\t#\$(..)\n\t\tSTA\t\t\2\+1\n 797 | ; \t\tMOVWI\t\2,$\3\1\n 798 | ; 799 | MAC MOVWI 800 | #if {2}==0 801 | LDA #0 802 | STA {1} 803 | STA {1}+1 804 | #else 805 | LDA #[[{2}>>0]&$FF] 806 | STA {1} 807 | LDA #[[{2}>>8]&$FF] 808 | STA {1}+1 809 | #endif 810 | ENDM 811 | 812 | ; \t\tLDA\t\t#\$(..)\n\t\tSTA\t\t(.*)\n\t\tLDA\t\t#\$(..)\n\t\tSTA\t\t\2\+1\n\t\tLDA\t\t#\$(..)\n\t\tSTA\t\t\2\+2\n 813 | ; \t\tMOVDI\t\2,$\4\3\1\n 814 | ; 815 | MAC MOVDI 816 | #if {2}==0 817 | LDA #0 818 | STA {1} 819 | STA {1}+1 820 | STA {1}+2 821 | #else 822 | LDA #[[{2}>>0 ]&$FF] 823 | STA {1} 824 | LDA #[[{2}>>8 ]&$FF] 825 | STA {1}+1 826 | LDA #[[{2}>>16]&$FF] 827 | STA {1}+2 828 | #endif 829 | ENDM 830 | 831 | ; \t\tINC\t\t(.*)\n\t\tBNE\t\t(.*)\n\t\tINC\t\t\1\+1\n\2:\n 832 | ; \t\tINCW\t\1\n\2: 833 | ; 834 | MAC INCW 835 | INC {1} 836 | BNE .1 837 | INC {1}+1 838 | .1: 839 | ENDM 840 | 841 | MAC ADDB 842 | #if {2}==#$02 843 | INC {1} 844 | INC {1} 845 | #else 846 | LDA {1} 847 | CLC 848 | ADC {2} 849 | STA {1} 850 | #endif 851 | ENDM 852 | 853 | MAC MADDB 854 | LDA {2} 855 | CLC 856 | ADC {3} 857 | STA {1} 858 | ENDM 859 | 860 | ; \t\tLDA\t\t(.*)\n\t\tCLC\n\t\tADC\t\t(.*)\n\t\tSTA\t\t\1\n\t\tBCC\t\t(.*)\n\t\tINC\t\t\1\+1\n\3: 861 | ; \t\tADDWB\t\1,\2\n\3: 862 | ; 863 | MAC ADDWB 864 | LDA {1} 865 | CLC 866 | ADC {2} 867 | STA {1} 868 | BCC .1 869 | INC {1}+1 870 | .1: 871 | ENDM 872 | 873 | ; Add two 16-bit integer or fixed point values and put it 874 | ; in third arg. 875 | ; 876 | MAC MADDW 877 | LDA {2} 878 | CLC 879 | ADC {3} 880 | STA {1} 881 | LDA {2}+1 882 | ADC {3}+1 883 | STA {1}+1 884 | ENDM 885 | 886 | ; Add two 16-bit integer or fixed point values, shift the 887 | ; result left, then store to third arg 888 | ; 889 | MAC LSADDW 890 | LDA {2} 891 | CLC 892 | ADC {3} 893 | STA {1} 894 | LDA {2}+1 895 | ADC {3}+1 896 | REPEAT {4} 897 | ASL {1} 898 | ROL 899 | REPEND 900 | STA {1}+1 901 | ENDM 902 | 903 | ; Shift right 16bit or 8x8 fixed point value, store arg 904 | ; 905 | MAC RSMOVW 906 | LDA {2} 907 | STA {1} 908 | LDA {2}+1 909 | REPEAT {3} 910 | LSR 911 | ROR {1} 912 | REPEND 913 | STA {1}+1 914 | ENDM 915 | 916 | MAC CMPW 917 | LDA {1} 918 | CMP {2} 919 | LDA {1}+1 920 | SBC {2}+1 921 | ENDM 922 | 923 | MAC CMPWI 924 | LDA {1} 925 | CMP #[[{2}>>0]&$FF] 926 | LDA {1}+1 927 | SBC #[[{2}>>8]&$FF] 928 | ENDM 929 | 930 | MAC MSUBW 931 | LDA {2} 932 | SEC 933 | SBC {3} 934 | STA {1} 935 | LDA {2}+1 936 | SBC {3}+1 937 | STA {1}+1 938 | ENDM 939 | 940 | MAC SUBB 941 | #if {2}==#$02 942 | DEC {1} 943 | DEC {1} 944 | #else 945 | LDA {1} 946 | SEC 947 | SBC {2} 948 | STA {1} 949 | #endif 950 | ENDM 951 | 952 | MAC MSUBB 953 | LDA {2} 954 | SEC 955 | SBC {3} 956 | STA {1} 957 | ENDM 958 | 959 | ; \t\tLDA\t\t(.*)\n\t\tSEC\n\t\tSBC\t\t\#\$(..)\n\t\tSTA\t\t\1\n\t\tLDA\t\t\1\+1\n\t\tSBC\t\t\#\$(..)\n\t\tSTA\t\t\1\+1\n\t\tBCS\t\t(.*)\n\t\tDEC\t\t\1\+2\n\4\:\n 960 | ; \t\tSUBDI16\t\1,\$\3\2\n\4\:\n 961 | ; 962 | ; Subtract 16-bit Word from 24-bit Dword 963 | ; in third arg. 964 | ; 965 | MAC SUBDI16 966 | LDA {1} 967 | SEC 968 | SBC #<[{2}] 969 | STA {1} 970 | LDA {1}+1 971 | SBC #>[{2}] 972 | STA {1}+1 973 | BCS .1 974 | DEC {1}+2 975 | .1: 976 | ENDM 977 | 978 | ; \t\tLDA\t\t(.*)\n\t\tSEC\n\t\tSBC\t\t(.*)\n\t\tSTA\t\t\1\n\t\tLDA\t\t\1\+1\n\t\tSBC\t\t\2\+1\n\t\tSTA\t\t\1\+1\n\t\tBCS\t\t(.*)\n\t\tDEC\t\t\1\+2\n\3\:\n 979 | ; \t\tSUBDW\t\1,\2\n\3\:\n 980 | ; 981 | MAC SUBDW 982 | LDA {1} 983 | SEC 984 | SBC {2} 985 | STA {1} 986 | LDA {1}+1 987 | SBC {2}+1 988 | STA {1}+1 989 | BCS .1 990 | DEC {1}+2 991 | .1: 992 | ENDM 993 | 994 | MAC SUBD 995 | LDA {1} 996 | SEC 997 | SBC {2} 998 | STA {1} 999 | LDA {1}+1 1000 | SBC {2}+1 1001 | STA {1}+1 1002 | LDA {1}+2 1003 | SBC {2}+2 1004 | STA {1}+2 1005 | ENDM 1006 | 1007 | MAC MSUBD 1008 | LDA {2} 1009 | SEC 1010 | SBC {3} 1011 | STA {1} 1012 | LDA {2}+1 1013 | SBC {3}+1 1014 | STA {1}+1 1015 | LDA {2}+2 1016 | SBC {3}+2 1017 | STA {1}+2 1018 | ENDM 1019 | 1020 | ;-------------------F-O-N-T-S------------------- 1021 | 1022 | _0 EQU $00 1023 | _1 EQU $01 1024 | _2 EQU $02 1025 | _3 EQU $03 1026 | _4 EQU $04 1027 | _5 EQU $05 1028 | _6 EQU $06 1029 | _7 EQU $07 1030 | _8 EQU $08 1031 | _9 EQU $09 1032 | _A EQU $0A 1033 | _B EQU $0B 1034 | _C EQU $0C 1035 | _D EQU $0D 1036 | _E EQU $0E 1037 | _F EQU $0F 1038 | _G EQU $10 1039 | _H EQU $11 1040 | _I EQU $12 1041 | _J EQU $13 1042 | _K EQU $14 1043 | _L EQU $15 1044 | _M EQU $16 1045 | _N EQU $17 1046 | _O EQU $18 1047 | _P EQU $19 1048 | _Q EQU $1A 1049 | _R EQU $1B 1050 | _S EQU $1C 1051 | _T EQU $1D 1052 | _U EQU $1E 1053 | _V EQU $1F 1054 | _W EQU $20 1055 | _X EQU $21 1056 | _Y EQU $22 1057 | _Z EQU $23 1058 | __ EQU $DF 1059 | 1060 | 1061 | ;-------------T-I-L-E--F-L-A-G-S---------------- 1062 | 1063 | _FL_CONDUCTOR EQU $80 1064 | _FL_FLAMMABLE EQU $40 1065 | _FL_ROAD EQU $20 1066 | _FL_RAIL EQU $10 1067 | _FL_TRANSPORT EQU _FL_ROAD|_FL_RAIL 1068 | _FL_BUILDING EQU $08 1069 | _FL_TERRAIN EQU $04 1070 | _FL_FLOODABLE EQU $02 1071 | _FL_WATER EQU $01 1072 | _FL_AREA EQU _FL_CONDUCTOR|_FL_FLAMMABLE|_FL_BUILDING|_FL_FLOODABLE 1073 | 1074 | ;--------------M-A-P--T-I-L-E-S----------------- 1075 | 1076 | _MAP_R_AREA_DEF EQU $00 1077 | _MAP_R_AREA01 EQU $01 1078 | _MAP_R_AREA02 EQU $02 1079 | _MAP_R_AREA03 EQU $03 1080 | _MAP_R_AREA04 EQU $04 1081 | _MAP_R_AREA05 EQU $05 1082 | _MAP_R_AREA06 EQU $06 1083 | _MAP_R_AREA07 EQU $07 1084 | _MAP_R_AREA08 EQU $08 1085 | _MAP_R_AREA09 EQU $09 1086 | _MAP_R_AREA0A EQU $0A 1087 | _MAP_R_AREA0B EQU $0B 1088 | _MAP_R_AREA0C EQU $0C 1089 | _MAP_R_AREA0D EQU $0D 1090 | _MAP_R_AREA0E EQU $0E 1091 | _MAP_R_AREA0F EQU $0F 1092 | _MAP_R_AREA10 EQU $10 1093 | _MAP_R_AREA11 EQU $11 1094 | _MAP_R_AREA12 EQU $12 1095 | _MAP_R_AREA13 EQU $13 1096 | _MAP_R_AREA14 EQU $14 1097 | _MAP_R_AREA_TWINA0 EQU $15 1098 | _MAP_R_AREA_TWINA1 EQU $16 1099 | _MAP_R_AREA_TWINB0 EQU $17 1100 | _MAP_R_AREA_TWINB1 EQU $18 1101 | _MAP_R_HOSPITAL EQU $19 1102 | _MAP_R_SCHOOL EQU $1A 1103 | ; EQU $1B 1104 | ; EQU $1C 1105 | ; EQU $1D 1106 | ; EQU $1E 1107 | ; EQU $1F 1108 | _MAP_C_AREA_DEF EQU $20 1109 | _MAP_C_AREA01 EQU $21 1110 | _MAP_C_AREA02 EQU $22 1111 | _MAP_C_AREA03 EQU $23 1112 | _MAP_C_AREA04 EQU $24 1113 | _MAP_C_AREA05 EQU $25 1114 | _MAP_C_AREA06 EQU $26 1115 | _MAP_C_AREA07 EQU $27 1116 | _MAP_C_AREA08 EQU $28 1117 | _MAP_C_AREA09 EQU $29 1118 | _MAP_C_AREA0A EQU $2A 1119 | _MAP_C_AREA0B EQU $2B 1120 | _MAP_C_AREA0C EQU $2C 1121 | _MAP_C_AREA0D EQU $2D 1122 | _MAP_C_AREA0E EQU $2E 1123 | _MAP_C_AREA0F EQU $2F 1124 | _MAP_C_AREA10 EQU $30 1125 | _MAP_C_AREA11 EQU $31 1126 | _MAP_C_AREA12 EQU $32 1127 | _MAP_C_AREA13 EQU $33 1128 | _MAP_C_AREA14 EQU $34 1129 | _MAP_C_AREA_TWINA0 EQU $35 1130 | _MAP_C_AREA_TWINA1 EQU $36 1131 | _MAP_C_AREA_TWINB0 EQU $37 1132 | _MAP_C_AREA_TWINB1 EQU $38 1133 | ; EQU $39 1134 | ; EQU $3A 1135 | ; EQU $3B 1136 | ; EQU $3C 1137 | ; EQU $3D 1138 | ; EQU $3E 1139 | ; EQU $3F 1140 | _MAP_I_AREA_DEF EQU $40 1141 | _MAP_I_AREA01 EQU $41 1142 | _MAP_I_AREA02 EQU $42 1143 | _MAP_I_AREA03 EQU $43 1144 | _MAP_I_AREA04 EQU $44 1145 | _MAP_I_AREA05 EQU $45 1146 | _MAP_I_AREA06 EQU $46 1147 | _MAP_I_AREA07 EQU $47 1148 | _MAP_I_AREA08 EQU $48 1149 | ; EQU $49 1150 | ; EQU $4A 1151 | ; EQU $4B 1152 | ; EQU $4C 1153 | ; EQU $4D 1154 | ; EQU $4E 1155 | ; EQU $4F 1156 | _MAP_POLICE_STATION EQU $50 1157 | _MAP_FIRE_STATION EQU $51 1158 | ; EQU $52 1159 | ; EQU $53 1160 | ; EQU $54 1161 | ; EQU $55 1162 | ; EQU $56 1163 | ; EQU $57 1164 | ; EQU $58 1165 | ; EQU $59 1166 | ; EQU $5A 1167 | ; EQU $5B 1168 | ; EQU $5C 1169 | ; EQU $5D 1170 | ; EQU $5E 1171 | ; EQU $5F 1172 | _MAP_COAL_POWER EQU $60 1173 | _MAP_NUCLEAR_POWER EQU $61 1174 | _MAP_SEA_PORT EQU $62 1175 | _MAP_STADIUM EQU $63 1176 | _MAP_AIR_PORT EQU $64 1177 | ; EQU $65 1178 | ; EQU $66 1179 | ; EQU $67 1180 | ; EQU $68 1181 | ; EQU $69 1182 | ; EQU $6A 1183 | ; EQU $6B 1184 | ; EQU $6C 1185 | ; EQU $6D 1186 | ; EQU $6E 1187 | ; EQU $6F 1188 | _MAP_BANK EQU $70 1189 | _MAP_AMUSEMENT_PARK EQU $71 1190 | _MAP_ZOO EQU $72 1191 | _MAP_CASINO EQU $73 1192 | ; EQU $74 ; "Reclaimed ground", not used by index 1193 | _MAP_NEW_POLICE EQU $75 1194 | _MAP_NEW_FIRE EQU $76 1195 | _MAP_10TH_MONUMENT EQU $77 1196 | _MAP_100TH_MONUMENT EQU $78 1197 | _MAP_EXPO_MONUMENT EQU $79 1198 | _MAP_LIBERTY_MONUMENT EQU $7A 1199 | _MAP_LIBRARY EQU $7B 1200 | _MAP_PARK_EXPAND EQU $7C 1201 | _MAP_TRAIN_STATION EQU $7D 1202 | _MAP_WHITE_HOUSE EQU $7E 1203 | ; EQU $7F 1204 | _MAP_INTERNAL_BUILD0 EQU $80 1205 | _MAP_INTERNAL_BUILD1 EQU $81 1206 | _MAP_INTERNAL_BUILD2 EQU $82 1207 | _MAP_INTERNAL_BUILD3 EQU $83 1208 | _MAP_INTERNAL_BUILD4 EQU $84 1209 | _MAP_INTERNAL_BUILD5 EQU $85 1210 | _MAP_INTERNAL_BUILD6 EQU $86 1211 | _MAP_INTERNAL_BUILD7 EQU $87 1212 | _MAP_INTERNAL_BUILD8 EQU $88 1213 | _MAP_INTERNAL_BUILD9 EQU $89 1214 | _MAP_INTERNAL_BUILDA EQU $8A 1215 | _MAP_INTERNAL_BUILDB EQU $8B 1216 | _MAP_INTERNAL_BUILDC EQU $8C 1217 | _MAP_INTERNAL_BUILDD EQU $8D 1218 | _MAP_INTERNAL_BUILDE EQU $8E 1219 | ; EQU $8F 1220 | _MAP_GROUND EQU $90 1221 | _MAP_ROAD_LR EQU $91 1222 | _MAP_ROAD_UD EQU $92 1223 | _MAP_ROAD_BEND_RD EQU $93 1224 | _MAP_ROAD_BEND_LD EQU $94 1225 | _MAP_ROAD_BEND_RU EQU $95 1226 | _MAP_ROAD_BEND_LU EQU $96 1227 | _MAP_ROAD_TCROSS_R EQU $97 1228 | _MAP_ROAD_TCROSS_L EQU $98 1229 | _MAP_ROAD_TCORSS_D EQU $99 1230 | _MAP_ROAD_TCROSS_U EQU $9A 1231 | _MAP_ROAD_CROSS EQU $9B 1232 | _MAP_RAIL_LR EQU $9C 1233 | _MAP_RAIL_UD EQU $9D 1234 | _MAP_RAIL_BEND_RD EQU $9E 1235 | _MAP_RAIL_BEND_LD EQU $9F 1236 | _MAP_RAIL_BEND_RU EQU $A0 1237 | _MAP_RAIL_BEND_LU EQU $A1 1238 | _MAP_RAIL_TCROSS_R EQU $A2 1239 | _MAP_RAIL_TCROSS_L EQU $A3 1240 | _MAP_RAIL_TCORSS_D EQU $A4 1241 | _MAP_RAIL_TCROSS_U EQU $A5 1242 | _MAP_RAIL_CROSS EQU $A6 1243 | _MAP_ELECTRO_LR EQU $A7 1244 | _MAP_ELECTRO_UD EQU $A8 1245 | _MAP_ELECTRO_BEND_RD EQU $A9 1246 | _MAP_ELECTRO_BEND_LD EQU $AA 1247 | _MAP_ELECTRO_BEND_RU EQU $AB 1248 | _MAP_ELECTRO_BEND_LU EQU $AC 1249 | _MAP_ELECTRO_TCROSS_R EQU $AD 1250 | _MAP_ELECTRO_TCROSS_L EQU $AE 1251 | _MAP_ELECTRO_TCORSS_D EQU $AF 1252 | _MAP_ELECTRO_TCROSS_U EQU $B0 1253 | _MAP_ELECTRO_CROSS EQU $B1 1254 | _MAP_GRASS EQU $B2 1255 | _MAP_TREE EQU $B3 1256 | _MAP_CORRUPTED EQU $B4 1257 | _MAP_FLOOD EQU $B5 1258 | _MAP_POLLUTION EQU $B6 1259 | _MAP_ROAD_RAIL_LR EQU $B7 1260 | _MAP_ROAD_RAIL_UD EQU $B8 1261 | _MAP_ELECTRO_ROAD_LR EQU $B9 1262 | _MAP_ELECTRO_ROAD_UD EQU $BA 1263 | _MAP_ELECTRO_RAIL_LR EQU $BB 1264 | _MAP_ELECTRO_RAIL_UD EQU $BC 1265 | _MAP_WATER EQU $BD 1266 | _MAP_SHORE0 EQU $BE 1267 | _MAP_SHORE1 EQU $BF 1268 | _MAP_SHORE2 EQU $C0 1269 | _MAP_SHORE3 EQU $C1 1270 | _MAP_SHORE4 EQU $C2 1271 | _MAP_SHORE5 EQU $C3 1272 | _MAP_SHORE6 EQU $C4 1273 | _MAP_SHORE7 EQU $C5 1274 | _MAP_SHORE8 EQU $C6 1275 | _MAP_SHORE9 EQU $C7 1276 | _MAP_SHOREA EQU $C8 1277 | _MAP_SHOREB EQU $C9 1278 | _MAP_SHOREC EQU $CA 1279 | _MAP_SHORED EQU $CB 1280 | _MAP_SHOREE EQU $CC 1281 | _MAP_SHOREF EQU $CD 1282 | _MAP_WOODS0 EQU $CE 1283 | _MAP_WOODS1 EQU $CF 1284 | _MAP_WOODS2 EQU $D0 1285 | _MAP_WOODS3 EQU $D1 1286 | _MAP_WOODS4 EQU $D2 1287 | _MAP_WOODS5 EQU $D3 1288 | _MAP_WOODS6 EQU $D4 1289 | _MAP_WOODS7 EQU $D5 1290 | _MAP_WOODS8 EQU $D6 1291 | _MAP_WOODS9 EQU $D7 1292 | _MAP_WOODSA EQU $D8 1293 | _MAP_WOODSB EQU $D9 1294 | _MAP_WOODSC EQU $DA 1295 | _MAP_WOODSD EQU $DB 1296 | _MAP_WOODSE EQU $DC 1297 | _MAP_WOODSF EQU $DD 1298 | _MAP_WOODS10 EQU $DE 1299 | _MAP_WOODS11 EQU $DF 1300 | _MAP_WATER_ROAD_LR EQU $E0 1301 | _MAP_WATER_ROAD_UD EQU $E1 1302 | _MAP_WATER_RAIL_LR EQU $E2 1303 | _MAP_WATER_RAIL_UD EQU $E3 1304 | _MAP_WATER_ELECTRO_LR EQU $E4 1305 | _MAP_WATER_ELECTRO_UD EQU $E5 1306 | _MAP_FIRE EQU $E6 1307 | _MAP_CORRUPT0 EQU $E7 1308 | _MAP_CORRUPT1 EQU $E8 1309 | _MAP_CORRUPT2 EQU $E9 1310 | _MAP_CORRUPT3 EQU $EA 1311 | _MAP_BRIDGE_ROAD_LR EQU $EB 1312 | _MAP_BRIDGE_ROAD_UD EQU $EC 1313 | _MAP_BRIDGE0 EQU $ED 1314 | _MAP_BRIDGE1 EQU $EE 1315 | _MAP_BRIDGE2 EQU $EF 1316 | _MAP_BRIDGE3 EQU $F0 1317 | _MAP_BRIDGE4 EQU $F1 1318 | _MAP_BRIDGE5 EQU $F2 1319 | _MAP_BRIDGE6 EQU $F3 1320 | _MAP_BRIDGE7 EQU $F4 1321 | _MAP_BRIDGE8 EQU $F5 1322 | _MAP_BRIDGE9 EQU $F6 1323 | _MAP_BRIDGEA EQU $F7 1324 | _MAP_BRIDGEB EQU $F8 1325 | _MAP_BRIDGEC EQU $F9 1326 | _MAP_BRIDGED EQU $FA 1327 | _MAP_BRIDGEE EQU $FB 1328 | _MAP_BRIDGEF EQU $FC 1329 | ; EQU $FD 1330 | _MAP_WATER_ROUTE EQU $FE 1331 | ; EQU $FF 1332 | -------------------------------------------------------------------------------- /bankE.inc: -------------------------------------------------------------------------------- 1 | 2 | ORG $C000 3 | 4 | BANK_START $FE 5 | 6 | ; --------------------------------------------------------------------------- 7 | ; ---------E-X-T-R-A--M-U-S-I-C--A-N-D--S-E--C-O-D-E--A-N-D--D-A-T-A--------- 8 | ; --------------------------------------------------------------------------- 9 | 10 | SECTION_START 101 11 | 12 | ; REDUNDANT 13 | ; =============== S U B R O U T I N E ======================================= 14 | ;_apu_play_se1: 15 | ; LDY _apu_se_idx_req+1 16 | ; TYA 17 | ; CMP #$30 18 | ; BEQ _j_apu_se3000_start 19 | ; LDA _apu_se_loop_idx+1 20 | ; CMP #$30 21 | ; BEQ _j_apu_se3000_loop 22 | ; LSR _apu_se_idx_req+1 23 | ; BCS _j_apu_se100_start 24 | ; LSR 25 | ; BCS _j_apu_se100_loop 26 | ; LSR _apu_se_idx_req+1 27 | ; BCS _apu_se200_start 28 | ; LSR 29 | ; BCS _apu_se200_loop 30 | ; LSR _apu_se_idx_req+1 31 | ; BCS _j_apu_se400_start 32 | ; LSR 33 | ; BCS _j_apu_se400_loop 34 | ; LSR _apu_se_idx_req+1 35 | ; BCS _j_apu_se800_start 36 | ; LSR 37 | ; BCS _j_apu_se800_loop 38 | ; LSR _apu_se_idx_req+1 39 | ; BCS _j_apu_se1000_start 40 | ; LSR 41 | ; BCS _j_apu_se1000_loop 42 | ; LSR _apu_se_idx_req+1 43 | ; BCS _j_apu_se2000_start 44 | ; LSR 45 | ; BCS _j_apu_se2000_loop 46 | ; LSR _apu_se_idx_req+1 47 | ; BCS _j_apu_se4000_start 48 | ; LSR 49 | ; BCS _j_apu_se4000_loop 50 | ; LSR _apu_se_idx_req+1 51 | ; BCS _j_apu_se8000_start 52 | ; LSR 53 | ; BCS _j_apu_se8000_loop 54 | ; RTS 55 | ; 56 | ; =============== S U B R O U T I N E ======================================= 57 | ;_j_apu_se3000_start: 58 | ; JMP _apu_se3000_start 59 | ; 60 | ; =============== S U B R O U T I N E ======================================= 61 | ;_j_apu_se3000_loop: 62 | ; JMP _apu_se3000_loop 63 | ; 64 | ; =============== S U B R O U T I N E ======================================= 65 | ;_j_apu_se100_start: 66 | ; JMP _apu_se100_start 67 | ; 68 | ; =============== S U B R O U T I N E ======================================= 69 | ;_j_apu_se100_loop: 70 | ; JMP _apu_se100_loop 71 | ; 72 | ; =============== S U B R O U T I N E ======================================= 73 | ;_j_apu_se400_start: 74 | ; JMP _apu_se400_start 75 | ; 76 | ; =============== S U B R O U T I N E ======================================= 77 | ;_j_apu_se400_loop: 78 | ; JMP _apu_se400_loop 79 | ; 80 | ; =============== S U B R O U T I N E ======================================= 81 | ;_j_apu_se800_start: 82 | ; JMP _apu_se800_start 83 | ; 84 | ; =============== S U B R O U T I N E ======================================= 85 | ;_j_apu_se800_loop: 86 | ; JMP _apu_se800_loop 87 | ; 88 | ; =============== S U B R O U T I N E ======================================= 89 | ;_j_apu_se1000_start: 90 | ; JMP _apu_se1000_start 91 | ; 92 | ; =============== S U B R O U T I N E ======================================= 93 | ;_j_apu_se1000_loop: 94 | ; JMP _apu_se1000_loop 95 | ; 96 | ; =============== S U B R O U T I N E ======================================= 97 | ;_j_apu_se2000_start: 98 | ; JMP _apu_se2000_start 99 | ; 100 | ; =============== S U B R O U T I N E ======================================= 101 | ;_j_apu_se2000_loop: 102 | ; JMP _apu_se2000_loop 103 | ; 104 | ; =============== S U B R O U T I N E ======================================= 105 | ;_j_apu_se4000_start: 106 | ; JMP _apu_se4000_start 107 | ; 108 | ; =============== S U B R O U T I N E ======================================= 109 | ;_j_apu_se4000_loop: 110 | ; JMP _apu_se4000_loop 111 | ; 112 | ; =============== S U B R O U T I N E ======================================= 113 | ;_j_apu_se8000_start: 114 | ; JMP _apu_se8000_start 115 | ; 116 | ; =============== S U B R O U T I N E ======================================= 117 | ;_j_apu_se8000_loop: 118 | ; JMP _apu_se8000_loop 119 | 120 | ; =============== S U B R O U T I N E ======================================= 121 | _apu_se100_start: 122 | ; STY _apu_se_loop_idx+1 123 | JSR _apu_dmc_reset_tri_mute 124 | LDA #_DPCM_IDX1 125 | STA _APU_DMC_ADDR 126 | LDA #$DF 127 | STA _APU_DMC_LEN 128 | LDA #$0D 129 | STA _APU_DMC_FREQ 130 | LDA _APU_STATUS 131 | AND #$09 132 | LDX _apu_dpcm_disable_flag 133 | BMI loc_1959AE 134 | ORA #$19 135 | loc_1959AE: 136 | STA _APU_STATUS 137 | 138 | ; =============== S U B R O U T I N E ======================================= 139 | _apu_se100_loop: 140 | LDA _APU_STATUS 141 | AND #$10 142 | BNE locret_1959C4 143 | ORA #$0F 144 | STA _APU_STATUS 145 | JSR _apu_dmc_reset_tri_mute 146 | LDA #$00 147 | STA _apu_se_loop_idx+1 148 | locret_1959C4: 149 | RTS 150 | 151 | ; =============== S U B R O U T I N E ======================================= 152 | _apu_se200_start: 153 | ; STY _apu_se_loop_idx+1 154 | JSR _apu_dmc_reset_tri_mute 155 | LDA #_DPCM_IDX0 156 | STA _APU_DMC_ADDR 157 | LDA #$FF 158 | STA _APU_DMC_LEN 159 | LDA #$0C 160 | STA _APU_DMC_FREQ 161 | LDA _APU_STATUS 162 | AND #$09 163 | LDX _apu_dpcm_disable_flag 164 | BMI loc_195978 165 | ORA #$10 166 | loc_195978: 167 | STA _APU_STATUS 168 | 169 | ; =============== S U B R O U T I N E ======================================= 170 | _apu_se200_loop: 171 | LDA _APU_STATUS 172 | AND #$10 173 | BNE locret_19598E 174 | ORA #$0F 175 | STA _APU_STATUS 176 | JSR _apu_dmc_reset_tri_mute 177 | LDA #$00 178 | STA _apu_se_loop_idx+1 179 | locret_19598E: 180 | RTS 181 | 182 | ; =============== S U B R O U T I N E ======================================= 183 | _apu_se400_start: 184 | ; STY _apu_se_loop_idx+1 185 | LDA #$7A 186 | STA _apu_se_loop_counters+1 187 | JSR _apu_p2_reset_tri_mute 188 | 189 | ; =============== S U B R O U T I N E ======================================= 190 | _apu_se400_loop: 191 | LDY _apu_se_loop_counters+1 192 | LDA byte_1959FA-1,Y 193 | ORA #$0C 194 | STA _APU_NOISE_LOOP 195 | LDA _apu_se_loop_counters+1 196 | LSR 197 | LSR 198 | LSR 199 | AND #$1F 200 | ORA #$18 201 | STA _APU_NOISE_ENV 202 | LDA #$18 203 | STA _APU_NOISE_LEN 204 | DEC _apu_se_loop_counters+1 205 | BNE locret_1959F9 206 | JSR _apu_p2_reset_tri_mute 207 | LDA #$00 208 | STA _apu_se_loop_idx+1 209 | LDA #$10 210 | STA _APU_NOISE_ENV 211 | locret_1959F9: 212 | RTS 213 | byte_1959FA: 214 | .BYTE $10,$63,$63,$93,$74,$B5,$A6,$97,$87,$78,$68,$59,$59,$4A,$4A,$3B 215 | .BYTE $3C,$3D,$2D,$2E,$2F,$1F,$2E,$2D,$2C,$2B,$3B,$3A,$49,$48,$58,$67 216 | .BYTE $77,$86,$95,$A5,$B4,$54,$54,$63,$63 217 | 218 | ; =============== S U B R O U T I N E ======================================= 219 | _apu_se800_start: 220 | ; STY _apu_se_loop_idx+1 221 | LDA #$0A 222 | STA _apu_se_loop_counters+1 223 | JSR _apu_p2_reset_tri_mute 224 | 225 | ; =============== S U B R O U T I N E ======================================= 226 | _apu_se800_loop: 227 | LDY _apu_se_loop_counters+1 228 | LDA byte_195A73-1,Y 229 | LDX byte_195A7D-1,Y 230 | STA _APU_NOISE_ENV 231 | STX _APU_NOISE_LOOP 232 | LDA #$08 233 | STA _APU_NOISE_LEN 234 | DEC _apu_se_loop_counters+1 235 | BNE locret_195A72 236 | JSR _apu_p2_reset 237 | LDA #$00 238 | STA _apu_se_loop_idx+1 239 | locret_195A72: 240 | RTS 241 | byte_195A73: 242 | .BYTE $01,$02,$00,$03,$01,$00,$03,$01,$00,$03 243 | byte_195A7D: 244 | .BYTE $0F,$0F,$0E,$0E,$0F,$0F,$0F,$0F,$0F,$8F 245 | 246 | ; =============== S U B R O U T I N E ======================================= 247 | _apu_se1000_start: 248 | JSR _apu_p2_reset_tri_mute 249 | ; STY _apu_se_loop_idx+1 250 | LDA #$40 251 | STA _apu_se_loop_counters+1 252 | LDA #$7F 253 | STA _APU_PULSE2_SWEEP 254 | 255 | ; =============== S U B R O U T I N E ======================================= 256 | _apu_se1000_loop: 257 | LDA _apu_se_loop_counters 258 | BNE loc_195AB1 259 | LDY _apu_se_loop_counters+1 260 | LDA byte_195ABD-1,Y 261 | STA _APU_TRI_COUNT 262 | LDA byte_195AFD-1,Y 263 | STA _APU_PULSE2_ENV 264 | LDA #$28 265 | JSR _apu_tritime_load 266 | LDA #$38 267 | JSR _apu_p2_time_load 268 | loc_195AB1: 269 | DEC _apu_se_loop_counters+1 270 | BNE locret_195ABC 271 | LDA #$00 272 | STA _apu_se_loop_idx+1 273 | JMP _apu_p2_reset 274 | locret_195ABC: 275 | RTS 276 | byte_195ABD: 277 | .BYTE $01,$41,$41,$41,$42,$42,$43,$44,$43,$44,$45,$44,$45,$46,$46,$46 278 | .BYTE $45,$45,$44,$44,$43,$42,$41,$41,$01,$41,$41,$41,$41,$00,$00,$00 279 | .BYTE $00,$00,$00,$00,$41,$41,$41,$41,$41,$42,$41,$42,$43,$42,$43,$44 280 | .BYTE $43,$44,$45,$44,$45,$46,$46,$46,$45,$45,$44,$44,$43,$42,$00,$41 281 | byte_195AFD: 282 | .BYTE $D8,$D8,$D8,$D8,$D7,$D7,$D7,$D7,$D6,$D6,$D6,$D6,$D6,$D5,$D5,$D5 283 | .BYTE $D5,$D4,$D4,$D4,$D4,$D3,$D2,$D1,$D0,$D0,$D0,$D0,$D0,$D0,$D0,$D0 284 | .BYTE $D0,$D0,$D0,$D0,$D0,$D0,$D0,$D0,$D8,$D8,$D8,$D8,$D7,$D7,$D7,$D7 285 | .BYTE $D6,$D6,$D6,$D6,$D6,$D5,$D5,$D5,$D5,$D4,$D4,$D4,$D4,$D3,$D2,$D1 286 | 287 | ; =============== S U B R O U T I N E ======================================= 288 | _apu_se2000_start: 289 | ; STY _apu_se_loop_idx+1 290 | LDA #$14 291 | STA _apu_se_loop_counters+1 292 | JSR _apu_p2_reset_tri_mute 293 | LDA #$83 294 | STA _APU_PULSE2_ENV 295 | LDA #$9D 296 | STA _APU_PULSE2_SWEEP 297 | LDA #$01 298 | STA _APU_TRI_COUNT 299 | LDA #$FE 300 | STA _APU_PULSE2_TIME 301 | STA _APU_TRI_TIME 302 | LDA #$08 303 | STA _APU_PULSE2_LEN 304 | STA _APU_TRI_LEN 305 | 306 | ; =============== S U B R O U T I N E ======================================= 307 | _apu_se2000_loop: 308 | DEC _apu_se_loop_counters+1 309 | BNE locret_195B70 310 | LDA #$00 311 | STA _apu_se_loop_idx+1 312 | JMP _apu_p2_reset 313 | locret_195B70: 314 | RTS 315 | 316 | ; =============== S U B R O U T I N E ======================================= 317 | _apu_se3000_start: 318 | ; STY _apu_se_loop_idx+1 319 | LDA #$A0 320 | STA _apu_se_loop_counters+1 321 | 322 | ; =============== S U B R O U T I N E ======================================= 323 | _apu_se3000_loop: 324 | LDA _apu_se_loop_counters+1 325 | LSR 326 | LSR 327 | TAY 328 | LDA byte_1959FA,Y 329 | ORA #$10 330 | STA _APU_NOISE_ENV 331 | LSR 332 | LSR 333 | LSR 334 | LSR 335 | STA _APU_NOISE_LOOP 336 | LDA #$18 337 | STA _APU_NOISE_LEN 338 | DEC _apu_se_loop_counters+1 339 | BNE locret_195A4A 340 | LDA #$00 341 | STA _apu_se_loop_idx+1 342 | locret_195A4A: 343 | RTS 344 | 345 | ; =============== S U B R O U T I N E ======================================= 346 | _apu_se4000_start: 347 | ; STY _apu_se_loop_idx+1 348 | LDA #$0A 349 | STA _apu_se_loop_counters+1 350 | JSR _apu_p2_reset_tri_mute 351 | LDA #$83 352 | STA _APU_PULSE2_ENV 353 | LDA #$9D 354 | STA _APU_PULSE2_SWEEP 355 | LDA #$01 356 | STA _APU_TRI_COUNT 357 | LDA #$FE 358 | STA _APU_PULSE2_TIME 359 | STA _APU_TRI_TIME 360 | LDA #$09 361 | STA _APU_PULSE2_LEN 362 | STA _APU_TRI_LEN 363 | 364 | ; =============== S U B R O U T I N E ======================================= 365 | _apu_se4000_loop: 366 | DEC _apu_se_loop_counters+1 367 | BNE locret_195BA4 368 | LDA #$00 369 | STA _apu_se_loop_idx+1 370 | JMP _apu_p2_reset 371 | locret_195BA4: 372 | RTS 373 | 374 | ; =============== S U B R O U T I N E ======================================= 375 | _apu_se8000_start: 376 | ; STY _apu_se_loop_idx+1 377 | LDA #$15 378 | STA _apu_se_loop_counters+1 379 | JSR _apu_p2_reset_tri_mute 380 | LDA #$01 381 | STA _APU_TRI_COUNT 382 | LDA #$83 383 | STA _APU_PULSE2_ENV 384 | LDA #$A1 385 | STA _APU_PULSE2_SWEEP 386 | LDA #$64 387 | JSR _apu_tritime_load 388 | LDA #$64 389 | JSR _apu_p2_time_load 390 | 391 | ; =============== S U B R O U T I N E ======================================= 392 | _apu_se8000_loop: 393 | DEC _apu_se_loop_counters+1 394 | BNE locret_195BD2 395 | JSR _apu_p2_reset 396 | LDA #$00 397 | STA _apu_se_loop_idx+1 398 | locret_195BD2: 399 | RTS 400 | 401 | SECTION_ENDS 101, "PRG0 APU SE ROUTINES" 402 | 403 | SECTION_START E00 404 | 405 | .ORG [[. + $3F] & $FFC0] 406 | 407 | _pcm_sample0: 408 | .BYTE $55,$55,$55,$67,$89,$AB,$CD,$EF,$B5,$54,$D5,$AA,$9A,$04,$54,$FD 409 | .BYTE $BF,$42,$42,$B5,$6D,$55,$51,$B5,$DD,$01,$00,$FB,$FF,$03,$00,$FE 410 | .BYTE $7F,$80,$A8,$6F,$9B,$B4,$0B,$00,$FA,$7F,$07,$A0,$FF,$05,$88,$BE 411 | .BYTE $AD,$A8,$A3,$3F,$00,$60,$FF,$59,$00,$FF,$0F,$60,$FB,$09,$4D,$9B 412 | .BYTE $FE,$03,$00,$FE,$03,$05,$FE,$8F,$00,$FF,$8B,$D8,$5A,$ED,$07,$80 413 | .BYTE $FE,$07,$40,$FC,$17,$88,$FD,$A3,$A8,$4F,$D5,$2F,$00,$FF,$0F,$00 414 | .BYTE $FC,$2F,$00,$FB,$07,$8D,$3D,$D5,$9F,$00,$FE,$1F,$00,$F4,$1F,$00 415 | .BYTE $F7,$17,$94,$76,$55,$FF,$00,$E0,$FF,$00,$F4,$3F,$00,$FC,$17,$54 416 | .BYTE $6D,$2B,$7F,$00,$F8,$7F,$00,$D8,$7F,$00,$FA,$47,$54,$7A,$CB,$EE 417 | .BYTE $00,$F0,$FF,$00,$B0,$FF,$00,$DA,$9F,$90,$76,$55,$FD,$01,$E0,$FF 418 | .BYTE $01,$40,$FF,$01,$B1,$3F,$29,$E9,$55,$F5,$03,$C0,$FE,$0B,$20,$FE 419 | .BYTE $0F,$04,$FF,$A2,$62,$5B,$69,$3F,$00,$E8,$FF,$00,$B0,$FF,$41,$E0 420 | .BYTE $3F,$59,$68,$AB,$F6,$17,$00,$FA,$9F,$00,$F0,$FF,$00,$D4,$BF,$A8 421 | .BYTE $A4,$5E,$ED,$0E,$00,$F8,$FF,$02,$68,$FF,$01,$2C,$F5,$13,$AD,$D4 422 | .BYTE $56,$FB,$01,$00,$FF,$3F,$00,$F8,$BF,$01,$68,$F5,$4D,$52,$D9,$6A 423 | .BYTE $FB,$00,$00,$FF,$FF,$02,$C0,$FE,$B6,$00,$F4,$EA,$2D,$49,$6A,$6B 424 | .BYTE $3F,$00,$C0,$FF,$BF,$00,$C0,$7F,$D5,$0A,$B0,$DB,$AA,$95,$64,$B5 425 | .BYTE $56,$27,$00,$EC,$FF,$57,$02,$C0,$7F,$55,$93,$C0,$76,$5B,$A9,$A2 426 | .BYTE $DA,$5A,$75,$00,$80,$FF,$7F,$2B,$00,$DA,$5F,$55,$25,$A8,$76,$9B 427 | .BYTE $2A,$A9,$6A,$AB,$6A,$2B,$00,$E8,$FF,$B7,$0A,$80,$FE,$55,$55,$09 428 | .BYTE $B2,$7D,$A5,$4A,$AA,$DA,$AA,$AA,$AA,$15,$00,$FE,$FF,$AA,$08,$40 429 | .BYTE $FF,$4B,$49,$84,$F6,$57,$AA,$44,$75,$9B,$AA,$52,$EA,$F6,$02,$00 430 | .BYTE $FF,$7F,$12,$00,$F6,$BF,$54,$80,$FC,$4F,$AA,$22,$B9,$57,$AA,$A4 431 | .BYTE $6A,$AB,$DA,$0A,$00,$FE,$FF,$25,$00,$EC,$BF,$4A,$00,$FF,$A5,$4A 432 | .BYTE $D0,$77,$AA,$25,$B4,$4B,$AB,$A4,$ED,$05,$80,$FE,$FF,$08,$60,$7F 433 | .BYTE $2B,$00,$DD,$B6,$0B,$68,$AB,$B7,$A0,$56,$56,$AB,$34,$55,$6F,$09 434 | .BYTE $00,$FF,$7F,$00,$EC,$FE,$03,$20,$F9,$AF,$04,$A1,$7F,$95,$A4,$56 435 | .BYTE $D5,$2A,$55,$D5,$F6,$02,$80,$FE,$9F,$00,$B4,$FF,$25,$80,$7D,$7B 436 | .BYTE $01,$B2,$FD,$A4,$92,$5A,$B5,$A9,$92,$DA,$76,$05,$80,$FE,$3F,$0A 437 | .BYTE $E0,$DF,$0F,$80,$E4,$DF,$12,$68,$F5,$55,$15,$A9,$6A,$9B,$4A,$6A 438 | .BYTE $DB,$0A,$00,$FB,$FF,$03,$A0,$FA,$4F,$05,$50,$ED,$6B,$49,$AA,$DA 439 | .BYTE $55,$49,$AA,$B6,$AA,$52,$B5,$12,$40,$FB,$FF,$07,$20,$F4,$ED,$26 440 | .BYTE $89,$28,$F5,$6D,$93,$54,$56,$D5,$54,$95,$6A,$A9,$95,$D5,$A8,$AA 441 | .BYTE $6A,$AB,$95,$2A,$55,$55,$95,$AA,$55,$55,$A5,$56,$55,$4B,$95,$55 442 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 443 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 444 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 445 | .BYTE $55,$55,$55,$55,$55,$9A,$8E,$E3,$54,$55,$55,$55,$55,$55,$55,$55 446 | .BYTE $55,$55,$55,$69,$55,$55,$95,$65,$55,$55,$95,$56,$E9,$54,$55,$55 447 | .BYTE $55,$59,$55,$65,$55,$55,$55,$A5,$63,$95,$DA,$E2,$62,$A5,$56,$EA 448 | .BYTE $58,$55,$5A,$55,$55,$2D,$A6,$B6,$AC,$54,$95,$55,$D5,$E2,$54,$4B 449 | .BYTE $55,$65,$55,$6A,$65,$59,$55,$55,$59,$55,$55,$55,$56,$5A,$55,$55 450 | .BYTE $55,$55,$55,$55,$55,$55,$95,$5A,$6A,$55,$35,$55,$95,$56,$55,$53 451 | .BYTE $55,$55,$55,$A5,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 452 | .BYTE $55,$55,$A5,$56,$55,$55,$55,$5A,$A5,$56,$95,$5A,$55,$55,$55,$55 453 | .BYTE $65,$2B,$55,$2B,$59,$55,$55,$55,$55,$55,$55,$55,$55,$55,$69,$55 454 | .BYTE $55,$56,$55,$55,$55,$55,$55,$55,$53,$55,$55,$55,$55,$55,$55,$55 455 | .BYTE $55,$55,$55,$56,$55,$55,$55,$55,$59,$55,$55,$55,$55,$55,$55,$55 456 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 457 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$B5,$52,$2B,$11,$EA,$FE 458 | .BYTE $AA,$2A,$49,$A8,$DD,$56,$A9,$A4,$B4,$B6,$AA,$56,$02,$C0,$FF,$BF 459 | .BYTE $AA,$08,$A0,$FB,$AA,$AA,$22,$D4,$7D,$95,$AA,$92,$6C,$AB,$56,$07 460 | .BYTE $00,$FC,$FF,$D7,$12,$00,$FE,$53,$DA,$04,$68,$6F,$B5,$9D,$20,$BB 461 | .BYTE $4A,$6D,$A5,$76,$00,$80,$FF,$FF,$0B,$00,$FB,$C9,$6E,$04,$F4,$13 462 | .BYTE $FD,$0A,$74,$17,$B9,$15,$EA,$AE,$01,$00,$FE,$FF,$27,$80,$7F,$D2 463 | .BYTE $24,$B0,$BB,$A4,$96,$EA,$5A,$AA,$2A,$D9,$AA,$DA,$46,$00,$FA,$FF 464 | .BYTE $15,$C0,$2F,$B5,$02,$BA,$93,$95,$A4,$5F,$D2,$25,$E9,$52,$B5,$A9 465 | .BYTE $1D,$00,$FC,$FF,$05,$E8,$A3,$5E,$80,$9B,$DA,$12,$DD,$A4,$57,$D2 466 | .BYTE $4A,$B6,$D2,$B6,$02,$C0,$FE,$7F,$80,$4E,$7D,$05,$2A,$B5,$93,$5A 467 | .BYTE $A9,$6D,$A9,$49,$D5,$D4,$56,$15,$80,$F6,$FF,$01,$4D,$FA,$4A,$54 468 | .BYTE $54,$5B,$B5,$A4,$B6,$AA,$25,$55,$55,$5B,$05,$A0,$FA,$7F,$52,$25 469 | .BYTE $75,$A9,$2A,$D4,$AA,$D5,$54,$55,$AD,$4A,$95,$5A,$D5,$82,$55,$D9 470 | .BYTE $B5,$DC,$54,$56,$52,$55,$AA,$AA,$AA,$55,$AD,$CA,$AA,$52,$AB,$42 471 | .BYTE $52,$B5,$ED,$DA,$2A,$95,$2A,$A5,$AA,$AA,$56,$55,$55,$AB,$AA,$54 472 | .BYTE $35,$92,$54,$DB,$AE,$2B,$55,$95,$52,$A9,$AA,$6A,$55,$55,$D3,$4A 473 | .BYTE $B5,$2A,$51,$54,$DB,$B6,$B6,$54,$A5,$52,$AA,$AA,$6A,$55,$55,$B5 474 | .BYTE $54,$B5,$4A,$12,$CB,$B6,$6D,$4B,$55,$2A,$55,$6A,$AA,$AA,$55,$55 475 | .BYTE $55,$B5,$AA,$24,$A9,$6C,$5B,$5D,$55,$A5,$4A,$A5,$A6,$56,$55,$55 476 | .BYTE $55,$AB,$AA,$92,$D0,$AA,$57,$6D,$55,$A9,$52,$A5,$56,$55,$55,$55 477 | .BYTE $55,$D5,$AA,$22,$D4,$6A,$57,$5B,$55,$AA,$54,$AA,$5A,$55,$55,$55 478 | .BYTE $55,$55,$AB,$0A,$70,$6B,$B7,$B6,$64,$A9,$52,$55,$55,$55,$55,$B5 479 | .BYTE $52,$D5,$AA,$0A,$D0,$AE,$6F,$AD,$A8,$AA,$54,$55,$69,$55,$55,$AD 480 | .BYTE $D4,$54,$AD,$25,$80,$7E,$FB,$26,$A9,$2A,$35,$55,$65,$55,$B5,$D4 481 | .BYTE $D4,$52,$AD,$2A,$00,$FB,$FB,$95,$24,$4B,$76,$52,$55,$6A,$AD,$CA 482 | .BYTE $4A,$55,$B5,$56,$02,$B0,$7F,$3F,$09,$B5,$E4,$4E,$68,$A5,$B6,$52 483 | .BYTE $41,$55,$AD,$6C,$25,$01,$F8,$BF,$1F,$24,$5A,$75,$13,$A9,$52,$90 484 | .BYTE $4A,$55,$02,$82,$AA,$A5,$0A,$A0,$7F,$7F,$82,$68,$D5,$AE,$90,$54 485 | .BYTE $75,$27,$35,$69,$AD,$AA,$AA,$AA,$0A,$A0,$FF,$7E,$82,$58,$A9,$9F 486 | .BYTE $28,$54,$B5,$9B,$2A,$55,$D5,$AA,$4A,$D5,$2A,$02,$F8,$FF,$57,$04 487 | .BYTE $4B,$EC,$55,$49,$4A,$6D,$AB,$96,$52,$55,$55,$2B,$55,$B5,$22,$D0 488 | .BYTE $77,$7B,$27,$92,$A4,$B4,$B6,$54,$55,$55,$55,$55,$55,$55,$55,$55 489 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$D5,$AA,$54,$55,$55,$55 490 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 491 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 492 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 493 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 494 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 495 | .BYTE $FF,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$69,$2B 496 | .BYTE $55,$55,$55,$55,$6A,$2B,$55,$69,$65,$B5,$4A,$55,$A9,$55,$55,$55 497 | .BYTE $55,$55,$55,$55,$55,$A9,$55,$55,$55,$55,$55,$55,$4D,$55,$A5,$AA 498 | .BYTE $AA,$AA,$56,$A5,$AA,$56,$55,$A9,$B5,$52,$B5,$4A,$95,$D6,$AA,$52 499 | .BYTE $00,$4A,$55,$55,$55,$55,$55,$55,$55,$55,$6A,$95,$AA,$AA,$55,$55 500 | .BYTE $55,$55,$55,$55,$55,$4B,$55,$55,$55,$B5,$AA,$AA,$11,$00,$FE,$7F 501 | .BYTE $AD,$08,$7D,$9B,$54,$42,$ED,$AB,$4E,$00,$80,$FF,$FF,$05,$00,$FA 502 | .BYTE $3F,$AA,$A0,$FE,$15,$95,$F4,$17,$00,$F8,$FF,$3B,$00,$E0,$FF,$80 503 | .BYTE $0A,$D8,$FF,$A1,$85,$F4,$BF,$00,$80,$FF,$FF,$01,$00,$FF,$39,$01 504 | .BYTE $C0,$FF,$6B,$12,$F8,$BF,$00,$B0,$FF,$BF,$00,$00,$FF,$7B,$00,$C0 505 | .BYTE $FF,$AE,$00,$FB,$1F,$00,$F0,$FF,$3F,$00,$E0,$FF,$2E,$00,$F8,$FA 506 | .BYTE $15,$D0,$DA,$1F,$00,$F0,$FF,$3F,$00,$48,$FF,$0F,$00,$D2,$FE,$83 507 | .BYTE $2B,$F0,$0F,$00,$FE,$FF,$07,$00,$A0,$FF,$0B,$11,$E8,$FF,$AE,$80 508 | .BYTE $7E,$00,$38,$F5,$FF,$00,$01,$FC,$FF,$0F,$00,$6F,$7F,$A2,$E4,$0E 509 | .BYTE $00,$A5,$FE,$7F,$00,$A0,$FF,$3F,$40,$40,$FF,$DB,$03,$3B,$00,$A8 510 | .BYTE $F8,$FF,$1F,$00,$A0,$FF,$EF,$01,$90,$FA,$4F,$6D,$02,$00,$E0,$FF 511 | .BYTE $7F,$54,$00,$B7,$FD,$A3,$0A,$EC,$D8,$8A,$4D,$C4,$4B,$5D,$DA,$AA 512 | .BYTE $95,$25,$B5,$B2,$52,$A9,$56,$D5,$B4,$52,$53,$A5,$AA,$D4,$56,$AD 513 | .BYTE $AA,$AA,$AA,$52,$A9,$AA,$D5,$4A,$B5,$52,$55,$AA,$D2,$5A,$B5,$AA 514 | .BYTE $AA,$AA,$52,$A9,$AA,$55,$D5,$AA,$AA,$54,$15,$3A,$D9,$55,$2F,$55 515 | .BYTE $49,$A3,$8A,$AD,$5D,$A5,$AA,$D2,$5E,$A0,$80,$B6,$FF,$3F,$50,$40 516 | .BYTE $C4,$D7,$6B,$13,$4B,$56,$AD,$BA,$72,$02,$00,$5E,$FF,$FF,$92,$00 517 | .BYTE $D1,$75,$A7,$46,$95,$55,$57,$95,$AA,$36,$00,$C2,$FB,$FF,$A3,$08 518 | .BYTE $49,$AB,$56,$55,$AA,$5A,$AD,$AA,$34,$B5,$DA,$00,$02,$6F,$FF,$9F 519 | .BYTE $05,$09,$4D,$57,$4B,$96,$AA,$5A,$AD,$AA,$AA,$AA,$5A,$41,$80,$EB 520 | .BYTE $FE,$AF,$22,$89,$95,$55,$A5,$4A,$AB,$D6,$AA,$AA,$2A,$AD,$AA,$5A 521 | .BYTE $80,$28,$FB,$FF,$AA,$48,$51,$6A,$55,$A9,$52,$AB,$B5,$AA,$AA,$4A 522 | .BYTE $55,$D5,$AA,$05,$20,$B5,$FF,$AF,$8A,$24,$59,$56,$55,$29,$B5,$6A 523 | .BYTE $B5,$AA,$AA,$54,$95,$55,$55,$4D,$28,$D9,$76,$DB,$5A,$4A,$AA,$54 524 | .BYTE $96,$AA,$2A,$AD,$5A,$D5,$AA,$2A,$55,$55,$55,$55,$B5,$60,$51,$F5 525 | .BYTE $DC,$B5,$AA,$54,$49,$95,$54,$55,$AD,$55,$D5,$AA,$AA,$54,$55,$6A 526 | .BYTE $59,$55,$13,$0B,$4D,$6F,$D7,$6A,$52,$25,$95,$AA,$54,$B5,$6A,$D5 527 | .BYTE $AA,$AA,$2A,$55,$A5,$AA,$55,$D5,$24,$15,$6D,$AB,$6B,$AB,$54,$A9 528 | .BYTE $94,$2A,$55,$AD,$5A,$55,$AB,$2A,$4D,$55,$A5,$6A,$55,$55,$95,$94 529 | .BYTE $AA,$AD,$6D,$B5,$52,$A5,$54,$AA,$2A,$B5,$6A,$55,$B5,$AA,$52,$55 530 | .BYTE $55,$55,$55,$55,$95,$48,$B6,$DD,$B5,$49,$2A,$55,$4D,$95,$2A,$6D 531 | .BYTE $55,$55,$55,$D5,$54,$55,$A5,$56,$55,$95,$AA,$11,$E5,$F6,$AD,$2A 532 | .BYTE $2A,$AD,$AA,$54,$52,$6D,$D5,$52,$65,$D5,$AA,$52,$55,$55,$55,$A5 533 | .BYTE $AA,$05,$D5,$6E,$AF,$4A,$AA,$AA,$AA,$92,$52,$AB,$B5,$52,$55,$B5 534 | .BYTE $2A,$55,$55,$D5,$B4,$52,$15,$50,$F5,$FF,$24,$49,$6B,$55,$8A,$2A 535 | .BYTE $5B,$95,$D2,$DA,$AA,$AA,$4A,$55,$55,$2B,$4D,$AD,$0A,$80,$FB,$7F 536 | .BYTE $A2,$E8,$B5,$91,$44,$AB,$AE,$94,$D8,$EA,$55,$49,$55,$AB,$2A,$B5 537 | .BYTE $AC,$DA,$01,$C0,$FE,$BF,$20,$F8,$6B,$05,$C4,$5E,$3B,$28,$B2,$EF 538 | .BYTE $8A,$92,$AD,$AA,$4A,$55,$B5,$E9,$00,$80,$FF,$3F,$70,$EC,$D7,$00 539 | .BYTE $49,$BF,$56,$90,$D8,$DF,$11,$25,$AF,$96,$54,$D9,$6A,$1B,$00,$E0 540 | .BYTE $FF,$0F,$14,$FF,$75,$00,$E2,$AF,$0D,$28,$F9,$77,$82,$CA,$9E,$9A 541 | .BYTE $54,$E9,$DA,$0E,$00,$FA,$FF,$03,$C0,$7F,$1D,$80,$B8,$5F,$07,$48 542 | .BYTE $FC,$5F,$81,$52,$AF,$26,$55,$DA,$B6,$03,$00,$FE,$FF,$00,$A1,$FF 543 | .BYTE $1D,$00,$E9,$5F,$47,$40,$ED,$AF,$12,$AA,$DA,$AA,$2A,$55,$6D,$03 544 | .BYTE $20,$EE,$FF,$0F,$80,$FA,$AB,$09,$64,$D9,$AD,$92,$AA,$B6,$AA,$4A 545 | .BYTE $A9,$55,$55,$95,$5A,$B5,$09,$AC,$DA,$5D,$AB,$24,$55,$95,$AA,$6A 546 | .BYTE $55,$55,$AA,$5A,$B5,$52,$55,$55,$55,$55,$55,$55,$55,$55,$51,$55 547 | .BYTE $B5,$AD,$55,$A9,$52,$65,$55,$55,$A5,$AA,$56,$55,$55,$55,$55,$55 548 | .BYTE $55,$55,$55,$55,$55,$55,$49,$55,$B5,$6D,$95,$2A,$55,$55,$A5,$AA 549 | .BYTE $65,$A5,$56,$55,$55,$55,$55,$55,$55,$55,$55,$55,$AD,$4A,$A8,$6C 550 | .BYTE $BB,$5D,$25,$49,$52,$AD,$B6,$AA,$24,$B5,$B6,$9A,$2A,$95,$AA,$D6 551 | .BYTE $AA,$AA,$AA,$02,$85,$BA,$FF,$AF,$44,$40,$E4,$DA,$B7,$2A,$09,$52 552 | .BYTE $DD,$BE,$AA,$24,$A1,$B5,$6D,$55,$55,$02,$24,$AD,$FF,$7F,$09,$20 553 | .BYTE $30,$7D,$DF,$56,$92,$20,$A9,$F7,$5B,$25,$89,$94,$B6,$6D,$AD,$4A 554 | .BYTE $00,$62,$FB,$FF,$D7,$40,$80,$C4,$D6,$77,$AB,$4A,$90,$54,$B7,$B7 555 | .BYTE $AA,$48,$52,$D5,$D6,$B6,$22,$04,$55,$DF,$F7,$4E,$2A,$08,$A9,$D4 556 | .BYTE $B6,$6D,$95,$4A,$AA,$6A,$B5,$AA,$92,$A6,$AA,$55,$55,$55,$65,$D1 557 | .BYTE $AA,$D5,$AA,$AA,$AA,$54,$55,$55,$A5,$6A,$65,$55,$55,$55,$55,$55 558 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 559 | .BYTE $55,$55,$55,$55,$69,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 560 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 561 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55 562 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$59,$4D,$55,$4B,$55,$55,$55 563 | .BYTE $69,$55,$4B,$69,$55,$55,$69,$55,$55,$55,$95,$AA,$96,$65,$CB,$52 564 | .BYTE $55,$59,$69,$5A,$55,$95,$95,$A6,$56,$5A,$A5,$69,$55,$55,$95,$95 565 | .BYTE $56,$55,$55,$55,$6A,$55,$A5,$95,$95,$56,$55,$65,$55,$55,$55,$55 566 | .BYTE $55,$55,$55,$55,$65,$A9,$95,$55,$55,$55,$95,$5A,$55,$95,$5A,$56 567 | .BYTE $55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$55,$56,$55,$55,$55,$55 568 | .BYTE $55,$55,$55,$55,$55,$5A,$55,$55,$55,$55,$55,$55,$55,$95,$55,$55 569 | .BYTE $55,$55,$55,$55,$55,$55,$51,$92,$7E,$7D,$25,$49,$70,$DB,$2E,$A9 570 | .BYTE $A8,$5A,$AD,$2A,$B5,$02,$C0,$FB,$FF,$2B,$00,$B4,$FD,$A5,$02,$54 571 | .BYTE $BB,$9D,$AA,$A8,$55,$9B,$4A,$95,$ED,$3E,$00,$20,$FE,$FF,$00,$A0 572 | .BYTE $FF,$2F,$0A,$80,$FF,$2F,$40,$84,$FE,$BF,$00,$AB,$EE,$68,$C9,$1F 573 | .BYTE $00,$8A,$FF,$3B,$00,$FC,$FF,$01,$00,$FA,$7F,$11,$D0,$B8,$BF,$2C 574 | .BYTE $A0,$AF,$2B,$58,$F5,$27,$80,$81,$FF,$0F,$00,$FF,$7F,$00,$40,$FF 575 | .BYTE $4B,$00,$DF,$BE,$14,$29,$6D,$5B,$51,$69,$FB,$0E,$00,$E8,$FF,$02 576 | .BYTE $E0,$FF,$1F,$00,$F4,$9F,$10,$D0,$7F,$23,$5A,$EA,$D2,$4A,$55,$D5 577 | .BYTE $AE,$0B,$C0,$F1,$1F,$00,$F0,$FF,$07,$80,$FF,$07,$A0,$FE,$07,$4A 578 | .BYTE $7E,$2A,$A5,$1D,$5A,$B5,$6D,$07,$80,$FF,$07,$00,$FE,$3F,$00,$E8 579 | .BYTE $FF,$01,$E8,$FF,$00,$EC,$1F,$A1,$6A,$27,$56,$75,$ED,$00,$E0,$FF 580 | .BYTE $0B,$00,$FF,$0F,$00,$FA,$5F,$00,$FB,$2F,$80,$FB,$47,$50,$5F,$89 581 | .BYTE $B6,$6A,$B5,$03,$C0,$FF,$03,$C0,$FF,$03,$C0,$FE,$83,$40,$FF,$13 582 | .BYTE $E8,$3E,$11,$AF,$26,$6A,$AB,$AA,$7D,$00,$F8,$FF,$00,$D6,$7F,$00 583 | .BYTE $B0,$FF,$00,$F0,$BF,$00,$FE,$4D,$68,$5B,$92,$7A,$25,$75,$1F,$00 584 | .BYTE $FC,$3F,$00,$FE,$3F,$00,$F4,$3F,$00,$F6,$17,$25,$BD,$D2,$4A,$4D 585 | .BYTE $5A,$B5,$52,$DB,$0E,$A0,$FF,$0F,$00,$FF,$07,$00,$FB,$0F,$90,$EC 586 | .BYTE $A7,$4A,$65,$CB,$AA,$54,$55,$55,$55,$AB,$03,$E0,$FF,$0B,$68,$DB 587 | .BYTE $16,$A8,$AA,$4E,$6A,$55,$55,$55,$55,$55,$9A,$AA,$96,$AA,$AA,$55 588 | .BYTE $55,$55,$55,$55,$55,$55,$55,$D5,$52,$65,$55,$55,$A5,$5A,$55,$55 589 | .BYTE $FF,$21,$A9,$9B,$56,$52,$65,$A5,$AD,$6A,$05,$A0,$FA,$DF,$03,$78 590 | .BYTE $B9,$A3,$92,$56,$AD,$AA,$8A,$AE,$1D,$00,$E8,$FF,$2F,$40,$E5,$8F 591 | .BYTE $15,$5C,$D9,$A9,$A5,$54,$6D,$07,$00,$FD,$FF,$01,$12,$7B,$37,$51 592 | .BYTE $C5,$CB,$56,$25,$B5,$09,$00,$FF,$FF,$05,$08,$7D,$BD,$A8,$A2,$55 593 | .BYTE $5B,$95,$6A,$09,$00,$FF,$FF,$81,$A0,$CE,$5D,$95,$58,$E9,$6A,$A5 594 | .BYTE $55,$00,$F0,$FF,$3F,$08,$A8,$FA,$D5,$12,$95,$56,$5D,$55,$05,$90 595 | .BYTE $FA,$FF,$51,$40,$A1,$5F,$2F,$25,$AA,$BA,$3A,$95,$00,$A9,$FF,$AF 596 | .BYTE $04,$09,$5B,$5F,$4D,$2A,$59,$B5,$DA,$80,$82,$DB,$BF,$8D,$12,$4A 597 | .BYTE $BC,$5B,$55,$4A,$65,$B5,$0A,$83,$CE,$5D,$AF,$4A,$8A,$AA,$DA,$56 598 | .BYTE $A5,$54,$55,$15,$0B,$9D,$5B,$57,$95,$2A,$A5,$55,$AD,$AA,$4A,$95 599 | .BYTE $26,$55,$55,$5B,$AD,$AA,$2A,$55,$55,$35,$4D,$55,$55,$95,$A5,$AA 600 | 601 | .ORG [[. + $3F] & $FFC0] 602 | 603 | _pcm_sample1: 604 | .BYTE $FF,$FF,$0B,$C0,$FF,$03,$00,$F0,$FF,$FF,$03,$00,$3F,$00,$01,$F0 605 | .BYTE $FF,$3F,$00,$C0,$FF,$FF,$03,$FC,$FF,$FF,$00,$C0,$3F,$00,$00,$FF 606 | .BYTE $3F,$00,$00,$E0,$FF,$00,$01,$FF,$FF,$0F,$C0,$DF,$FF,$FF,$00,$F0 607 | .BYTE $00,$00,$00,$FE,$BF,$00,$C0,$7F,$00,$FC,$FF,$FF,$00,$3F,$3F,$00 608 | .BYTE $F4,$FF,$FF,$03,$F0,$03,$00,$00,$80,$FF,$2F,$00,$F6,$FF,$00,$F8 609 | .BYTE $FF,$FF,$FF,$3F,$00,$00,$00,$80,$F0,$FF,$3F,$00,$00,$00,$00,$FC 610 | .BYTE $FF,$FF,$FF,$C9,$BF,$00,$80,$FF,$FF,$FF,$7F,$01,$00,$00,$00,$80 611 | .BYTE $FF,$FF,$1F,$00,$F0,$C0,$3F,$FC,$FF,$FF,$0F,$00,$00,$3C,$00,$FC 612 | .BYTE $FF,$3F,$00,$00,$00,$F0,$FF,$FF,$BF,$F4,$3F,$00,$00,$FC,$FF,$FF 613 | .BYTE $3F,$00,$00,$00,$B8,$00,$FF,$FF,$F0,$00,$0F,$00,$F0,$FF,$FF,$FF 614 | .BYTE $C3,$00,$C0,$0B,$C0,$FF,$FF,$0F,$00,$F0,$40,$02,$FE,$FF,$FF,$C0 615 | .BYTE $00,$00,$3F,$FC,$FF,$FF,$87,$00,$3F,$00,$00,$FC,$FF,$BF,$00,$00 616 | .BYTE $00,$40,$FF,$FF,$FF,$3F,$0C,$00,$00,$FF,$FF,$3F,$F0,$00,$00,$00 617 | .BYTE $F0,$FF,$FF,$8B,$2F,$00,$00,$FE,$FF,$FF,$FF,$3F,$00,$00,$00,$F0 618 | .BYTE $FF,$80,$0F,$00,$00,$00,$FF,$FF,$FF,$FF,$0F,$00,$00,$E0,$FF,$FF 619 | .BYTE $3F,$00,$00,$38,$00,$F0,$FF,$FF,$0F,$00,$C0,$C3,$FF,$FF,$3F,$C0 620 | .BYTE $3F,$00,$00,$FF,$FF,$BF,$F8,$03,$00,$00,$C0,$FF,$FF,$0F,$C0,$03 621 | .BYTE $00,$E0,$FF,$FF,$FF,$BF,$00,$00,$F0,$00,$C0,$FF,$FF,$00,$00,$F0 622 | .BYTE $0F,$C0,$FF,$FF,$3F,$00,$FC,$C3,$02,$00,$FF,$FF,$F4,$07,$00,$0F 623 | .BYTE $00,$00,$F0,$FF,$FF,$03,$C0,$FF,$03,$F0,$FF,$FF,$FF,$03,$20,$00 624 | .BYTE $00,$00,$C0,$F8,$FF,$0F,$C0,$FF,$03,$FE,$FF,$FF,$FF,$00,$FC,$00 625 | .BYTE $00,$00,$F0,$FF,$03,$00,$F0,$C3,$0F,$FC,$FF,$FF,$0F,$C0,$FF,$00 626 | .BYTE $BC,$FC,$0F,$00,$00,$FC,$3F,$00,$F0,$FF,$03,$00,$00,$FF,$FF,$FF 627 | .BYTE $3F,$F0,$03,$C0,$FF,$FF,$1F,$02,$00,$00,$FF,$00,$00,$FC,$FF,$FF 628 | .BYTE $00,$00,$00,$FF,$FF,$FF,$0F,$0F,$00,$00,$00,$8F,$FF,$FF,$3F,$00 629 | .BYTE $00,$00,$F0,$FF,$FF,$0F,$FE,$03,$00,$00,$FC,$FF,$FF,$0B,$00,$00 630 | .BYTE $BC,$C0,$FF,$FF,$0F,$C0,$03,$00,$FF,$FF,$FF,$FF,$00,$00,$00,$C0 631 | .BYTE $FF,$FF,$BF,$00,$00,$00,$00,$FD,$FF,$FF,$3F,$00,$00,$00,$FC,$FF 632 | .BYTE $FF,$7F,$00,$00,$01,$F0,$FF,$FF,$3F,$00,$00,$00,$C0,$FF,$FF,$FF 633 | .BYTE $FA,$0F,$00,$0F,$F0,$FF,$FF,$03,$00,$00,$00,$FC,$3F,$00,$FF,$7F 634 | .BYTE $00,$FF,$FF,$FF,$0F,$07,$00,$00,$00,$00,$FF,$FF,$03,$C0,$C0,$AF 635 | .BYTE $FF,$FF,$FF,$0F,$00,$00,$00,$00,$FC,$FF,$FF,$03,$10,$00,$00,$FF 636 | .BYTE $FF,$FF,$C2,$0F,$06,$00,$E0,$FF,$FF,$FF,$FF,$00,$00,$00,$00,$F0 637 | .BYTE $FF,$02,$00,$F0,$02,$FF,$FF,$FF,$FF,$FF,$00,$0F,$C0,$BF,$90,$00 638 | .BYTE $F0,$03,$00,$F0,$FF,$FF,$FF,$3F,$00,$D0,$00,$FF,$FF,$2F,$00,$BC 639 | .BYTE $00,$00,$F0,$FF,$FF,$FF,$00,$00,$C0,$2F,$F0,$FF,$FF,$00,$20,$00 640 | .BYTE $80,$FE,$FF,$FF,$FF,$02,$00,$F0,$00,$FF,$3F,$1F,$00,$00,$3C,$F0 641 | .BYTE $F0,$FF,$FF,$FF,$3F,$00,$00,$C0,$FF,$FF,$80,$02,$00,$00,$F8,$CF 642 | .BYTE $FF,$FF,$BF,$00,$00,$C0,$FF,$FB,$F0,$03,$00,$FC,$FF,$03,$FF,$0F 643 | .BYTE $0C,$00,$00,$00,$FF,$FF,$55,$6D,$D1,$07,$F0,$FF,$FF,$FF,$00,$00 644 | .BYTE $00,$00,$80,$FF,$BF,$80,$FF,$BF,$00,$C0,$0F,$FF,$FF,$FF,$00,$00 645 | .BYTE $00,$08,$FC,$0F,$FF,$E3,$3F,$00,$FC,$00,$FF,$FF,$FF,$00,$D0,$00 646 | .BYTE $00,$00,$E0,$FF,$FF,$FF,$03,$00,$00,$FC,$F4,$FF,$FF,$3F,$00,$00 647 | .BYTE $00,$C0,$FF,$FF,$FF,$3F,$00,$00,$00,$D3,$FF,$FF,$F5,$01,$00,$00 648 | .BYTE $E0,$FF,$FF,$FF,$7F,$00,$00,$00,$C0,$FF,$FF,$0F,$00,$00,$00,$F0 649 | .BYTE $FF,$FF,$FF,$BF,$00,$00,$00,$F0,$FF,$FF,$FF,$00,$00,$00,$FC,$E3 650 | .BYTE $FF,$FF,$1F,$00,$00,$00,$FF,$FF,$BF,$38,$00,$00,$00,$FC,$FF,$FF 651 | .BYTE $FF,$03,$00,$40,$00,$FC,$FF,$FF,$08,$F0,$0F,$00,$FC,$FF,$FF,$0B 652 | .BYTE $00,$C0,$FF,$02,$00,$F0,$FF,$C2,$1F,$00,$C0,$FB,$FF,$FF,$2F,$C0 653 | .BYTE $3F,$00,$00,$00,$F0,$FF,$0F,$1C,$3E,$00,$F0,$FF,$FF,$FF,$FF,$3F 654 | .BYTE $00,$00,$00,$F0,$FF,$03,$C0,$01,$00,$FD,$FF,$FF,$FF,$FF,$0B,$00 655 | .BYTE $00,$00,$FF,$D2,$0F,$28,$00,$00,$FE,$FF,$FF,$FF,$BF,$00,$00,$00 656 | .BYTE $00,$FF,$FF,$04,$90,$00,$00,$FF,$FF,$FF,$FF,$3F,$00,$C0,$00,$C0 657 | .BYTE $FF,$FF,$0F,$00,$00,$00,$FC,$FF,$FF,$FF,$3F,$00,$00,$00,$C0,$FF 658 | .BYTE $FF,$0F,$00,$00,$C0,$FF,$FF,$FF,$FF,$BF,$00,$00,$00,$F0,$FF,$FF 659 | .BYTE $00,$00,$00,$00,$FF,$FF,$FF,$F7,$FF,$00,$00,$00,$E2,$02,$00,$FF 660 | .BYTE $FF,$FF,$82,$FF,$FF,$1F,$02,$00,$A0,$00,$00,$03,$FC,$E3,$FF,$FF 661 | .BYTE $FF,$C0,$FF,$FF,$3F,$00,$00,$00,$00,$00,$0A,$FC,$C3,$FF,$FF,$C0 662 | .BYTE $FF,$FF,$FF,$0F,$00,$00,$00,$00,$C0,$0F,$00,$C0,$FF,$FF,$FF,$FF 663 | .BYTE $FF,$BF,$00,$00,$00,$00,$00,$F0,$0F,$E0,$FF,$FF,$FF,$FF,$FF,$FF 664 | .BYTE $00,$00,$00,$00,$00,$F0,$07,$C0,$FF,$FF,$FF,$FF,$FF,$2F,$00,$00 665 | .BYTE $00,$00,$00,$00,$FC,$7F,$F4,$FF,$FF,$FF,$FF,$FF,$03,$02,$00,$00 666 | .BYTE $00,$00,$00,$30,$FC,$FF,$FF,$FF,$FF,$FF,$0F,$FC,$03,$00,$00,$00 667 | .BYTE $00,$E0,$FF,$FF,$03,$FF,$FF,$3F,$C0,$FF,$03,$00,$F0,$3C,$80,$FF 668 | .BYTE $1C,$40,$FF,$00,$FC,$FF,$0F,$FF,$00,$00,$00,$00,$00,$F8,$FF,$FF 669 | .BYTE $FF,$03,$00,$F0,$3F,$FC,$BF,$00,$00,$34,$00,$C0,$FF,$FF,$FF,$3F 670 | .BYTE $00,$7C,$0B,$C0,$FF,$3F,$00,$00,$00,$C0,$FF,$FF,$FF,$0F,$00,$FC 671 | .BYTE $FF,$02,$FF,$02,$00,$00,$0A,$E0,$FF,$FF,$FF,$3F,$00,$00,$FF,$FA 672 | .BYTE $FF,$03,$00,$00,$00,$C0,$FF,$FF,$FF,$FF,$03,$00,$80,$3F,$F0,$FF 673 | .BYTE $23,$00,$00,$00,$F0,$FF,$FF,$FF,$FF,$03,$00,$00,$3F,$E0,$FF,$0F 674 | .BYTE $00,$0C,$00,$FC,$FF,$FF,$FF,$FF,$00,$00,$80,$25,$C0,$FF,$03,$02 675 | .BYTE $BE,$00,$FF,$FF,$FE,$FF,$0F,$28,$00,$00,$00,$00,$FF,$FF,$FF,$0B 676 | .BYTE $00,$FF,$FF,$2F,$00,$FF,$83,$03,$00,$00,$3C,$F0,$FF,$FF,$2F,$80 677 | .BYTE $FF,$9B,$00,$00,$7F,$58,$02,$09,$00,$FE,$FF,$3F,$FD,$FF,$FF,$23 678 | .BYTE $00,$00,$00,$C0,$03,$00,$3F,$F0,$FF,$FF,$FF,$C3,$FF,$FF,$05,$F8 679 | .BYTE $03,$00,$C0,$FF,$03,$F4,$00,$00,$F0,$3F,$FC,$FF,$FF,$E3,$FF,$00 680 | .BYTE $00,$00,$F0,$C0,$7F,$40,$D7,$09,$00,$FC,$FF,$FF,$FF,$0F,$00,$00 681 | .BYTE $FF,$00,$00,$FC,$FF,$3F,$00,$00,$FC,$2F,$F0,$FF,$07,$00,$00,$F0 682 | .BYTE $03,$00,$FE,$FF,$C3,$FF,$05,$FE,$FF,$2F,$00,$00,$00,$FF,$FF,$40 683 | .BYTE $0F,$00,$C0,$FF,$FF,$FF,$00,$F0,$00,$00,$FC,$FF,$0F,$00,$C0,$FF 684 | .BYTE $FF,$00,$FF,$FF,$00,$00,$00,$00,$FE,$FF,$FF,$FF,$2F,$00,$00,$0A 685 | .BYTE $C0,$FF,$FF,$03,$00,$3C,$F0,$FD,$7F,$FD,$3F,$C0,$76,$F7,$2F,$00 686 | .BYTE $00,$00,$00,$00,$00,$3C,$F0,$FF,$FF,$FF,$FF,$FF,$FF,$03,$00,$00 687 | .BYTE $0F,$00,$94,$00,$00,$FC,$FF,$3F,$FF,$FF,$FF,$BF,$00,$00,$00,$00 688 | .BYTE $F0,$FF,$FF,$03,$00,$00,$FC,$FF,$FF,$FF,$C3,$BF,$00,$00,$FC,$00 689 | .BYTE $E0,$FF,$BF,$34,$00,$00,$FC,$FF,$FF,$C0,$FF,$0F,$00,$00,$00,$FF 690 | .BYTE $00,$FD,$FF,$07,$00,$1F,$00,$F0,$FF,$FF,$FF,$03,$24,$00,$00,$00 691 | .BYTE $FF,$FB,$FF,$FF,$23,$00,$00,$00,$FF,$FF,$FF,$FF,$03,$00,$00,$00 692 | .BYTE $C0,$FF,$FF,$0F,$C0,$2F,$00,$80,$FF,$FF,$FF,$FF,$03,$00,$F0,$00 693 | .BYTE $F0,$C3,$FF,$FF,$7F,$00,$00,$80,$7F,$00,$FF,$0F,$00,$00,$F0,$0F 694 | .BYTE $C0,$FF,$FF,$BF,$FF,$03,$00,$F0,$1E,$F8,$FF,$03,$00,$00,$0F,$FF 695 | .BYTE $FF,$00,$00,$FC,$FF,$0F,$E0,$03,$00,$0F,$F0,$FF,$03,$80,$C0,$FF 696 | .BYTE $FF,$FF,$0F,$00,$00,$FF,$FF,$02,$00,$A0,$BD,$C0,$FF,$FF,$03,$00 697 | .BYTE $FC,$FF,$1F,$00,$00,$FC,$FF,$FF,$FF,$0F,$00,$00,$00,$E0,$00,$00 698 | .BYTE $FF,$FF,$FF,$FF,$00,$00,$C0,$FF,$FF,$3F,$00,$00,$F0,$FF,$BF,$00 699 | .BYTE $00,$80,$FF,$FF,$03,$00,$FC,$FF,$FF,$2F,$00,$00,$00,$00,$F8,$FF 700 | .BYTE $FF,$27,$F2,$FF,$0F,$00,$FF,$00,$00,$00,$C0,$FF,$7F,$FD,$FF,$0F 701 | .BYTE $00,$FF,$FF,$01,$C0,$00,$16,$00,$F8,$FF,$3F,$00,$FC,$FF,$0F,$00 702 | .BYTE $C0,$FF,$FF,$00,$00,$00,$FC,$D2,$FF,$FF,$C0,$FF,$0F,$00,$00,$F8 703 | .BYTE $FF,$FC,$3F,$00,$00,$FC,$0F,$FC,$03,$FC,$FF,$03,$00,$FC,$FF,$03 704 | .BYTE $00,$00,$FF,$0B,$00,$00,$00,$F4,$FF,$FF,$0F,$FC,$FF,$3F,$00,$00 705 | .BYTE $C0,$FF,$FF,$3F,$00,$00,$C0,$FF,$F2,$FF,$FE,$01,$FC,$7F,$00,$00 706 | .BYTE $FF,$00,$FC,$FF,$0F,$00,$00,$C0,$FF,$3F,$00,$00,$FC,$FF,$2F,$18 707 | .BYTE $00,$00,$F0,$FF,$FF,$FF,$00,$00,$D0,$FF,$FF,$0F,$00,$00,$00,$FF 708 | .BYTE $FF,$0F,$00,$C0,$FF,$FF,$FF,$03,$00,$00,$F8,$FF,$FF,$0F,$00,$00 709 | .BYTE $00,$FC,$FF,$3F,$00,$F0,$FF,$FF,$0B,$00,$00,$FF,$FF,$FF,$03,$00 710 | .BYTE $00,$00,$FF,$FF,$FF,$02,$00,$FF,$2F,$3C,$00,$FF,$0F,$FC,$02,$00 711 | .BYTE $00,$F0,$FF,$2F,$00,$38,$00,$FC,$FF,$FF,$FF,$FF,$0F,$00,$00,$00 712 | .BYTE $FC,$FF,$03,$B0,$00,$00,$FC,$FF,$FF,$3F,$00,$00,$00,$FF,$FF,$FF 713 | .BYTE $03,$00,$00,$FF,$FD,$FF,$FF,$00,$F0,$3F,$00,$00,$F4,$FF,$2F,$28 714 | .BYTE $00,$00,$F8,$FF,$FF,$FF,$03,$00,$00,$00,$FF,$FF,$01,$00,$C0,$FF 715 | .BYTE $FF,$FF,$3F,$00,$80,$F7,$FF,$0F,$00,$F8,$FF,$00,$00,$00,$FF,$E3 716 | .BYTE $FF,$FF,$03,$00,$F0,$AF,$08,$00,$56,$00,$00,$FF,$FF,$FF,$FF,$C2 717 | .BYTE $01,$FE,$03,$00,$FC,$3F,$C0,$FF,$FF,$FF,$0F,$00,$00,$FF,$7F,$00 718 | .BYTE $00,$00,$FC,$03,$00,$00,$00,$FC,$FF,$FF,$FF,$FF,$00,$00,$FF,$C0 719 | .BYTE $FF,$FF,$00,$00,$00,$FC,$B4,$02,$C0,$FF,$FF,$FF,$FF,$3F,$00,$00 720 | .BYTE $DC,$03,$00,$00,$C0,$FF,$FF,$FF,$3F,$00,$3E,$F0,$FF,$00,$00,$C0 721 | .BYTE $0B,$80,$FF,$FF,$7F,$FF,$03,$00,$E4,$FF,$03,$00,$F0,$8F,$BD,$00 722 | .BYTE $D0,$FF,$FF,$03,$F0,$FF,$00,$00,$0F,$FC,$FF,$00,$2C,$FF,$03,$C0 723 | .BYTE $7F,$FC,$03,$F2,$BF,$03,$00,$00,$00,$F0,$FF,$FF,$3F,$00,$7E,$F5 724 | .BYTE $FF,$FF,$00,$00,$00,$40,$F7,$FF,$01,$00,$C0,$FF,$FF,$3F,$00,$FC 725 | .BYTE $0F,$F0,$FF,$00,$00,$00,$00,$FD,$FF,$FF,$FF,$9F,$0A,$00,$00,$C0 726 | .BYTE $3F,$FC,$FF,$8F,$00,$00,$A0,$F6,$FF,$FF,$C0,$BF,$00,$00,$FC,$FF 727 | .BYTE $FF,$3F,$00,$00,$00,$00,$FF,$FF,$FF,$F8,$00,$00,$F8,$FF,$FF,$FF 728 | .BYTE $03,$00,$00,$00,$00,$FC,$FF,$FF,$FF,$02,$FC,$03,$00,$00,$F0,$FF 729 | .BYTE $3F,$00,$4F,$FF,$FF,$3F,$00,$00,$E0,$FF,$03,$00,$00,$F0,$FF,$FF 730 | .BYTE $FF,$FF,$02,$00,$00,$49,$3F,$00,$F0,$FF,$03,$FE,$FF,$03,$00,$FC 731 | .BYTE $FF,$00,$00,$1E,$F4,$FF,$FF,$0F,$00,$00,$00,$FF,$CB,$FF,$3F,$00 732 | .BYTE $00,$FF,$0F,$0C,$00,$F0,$FF,$2F,$E0,$47,$FF,$FF,$C3,$FF,$02,$00 733 | .BYTE $00,$00,$00,$FF,$FF,$FF,$03,$40,$F6,$FF,$FF,$27,$00,$00,$00,$FF 734 | .BYTE $FF,$00,$00,$C0,$FF,$FF,$03,$00,$E8,$FF,$F3,$2F,$20,$80,$FF,$03 735 | .BYTE $50,$00,$00,$FF,$FF,$FF,$9F,$02,$00,$00,$FF,$FF,$03,$00,$F0,$FF 736 | .BYTE $FF,$FB,$03,$00,$FF,$FF,$E3,$0B,$00,$00,$3F,$00,$00,$00,$FC,$FF 737 | .BYTE $FF,$FF,$3F,$00,$00,$FE,$FF,$FF,$03,$00,$00,$00,$F0,$FF,$FF,$00 738 | .BYTE $C0,$FF,$FF,$0F,$00,$C0,$FB,$FF,$0B,$00,$EF,$AB,$2D,$00,$00,$6A 739 | .BYTE $FF,$FF,$2F,$00,$00,$D0,$01,$F0,$FF,$FF,$02,$F2,$FF,$00,$1C,$FF 740 | .BYTE $FF,$01,$C0,$3F,$00,$00,$00,$C0,$FF,$FF,$FF,$FF,$40,$FF,$07,$00 741 | .BYTE $00,$F0,$FF,$F8,$FF,$03,$00,$C0,$03,$C0,$FF,$FF,$FF,$0B,$00,$D0 742 | .BYTE $03,$00,$FF,$FF,$FF,$03,$00,$00,$F0,$FF,$FF,$00,$00,$00,$E0,$FF 743 | .BYTE $FF,$7F,$FE,$1F,$00,$00,$00,$B4,$FE,$FF,$FF,$03,$00,$00,$C0,$FF 744 | .BYTE $FF,$FF,$FF,$00,$00,$00,$00,$FC,$FF,$FF,$2F,$80,$0B,$00,$00,$FC 745 | .BYTE $FF,$0F,$00,$FF,$03,$F0,$FF,$2F,$00,$00,$3C,$FD,$FF,$DF,$D7,$FF 746 | .BYTE $1F,$00,$00,$00,$00,$00,$FC,$FF,$0F,$80,$FF,$5F,$FF,$FF,$0F,$00 747 | .BYTE $C0,$FF,$03,$00,$00,$80,$E2,$FF,$FF,$01,$00,$C0,$FF,$FF,$FF,$03 748 | .BYTE $00,$F8,$FF,$FF,$FF,$03,$00,$00,$30,$00,$FC,$FF,$FF,$FF,$03,$00 749 | .BYTE $00,$F0,$FF,$FF,$00,$38,$00,$F0,$FF,$7F,$01,$FC,$FF,$00,$00,$00 750 | .BYTE $00,$FD,$FF,$FF,$FF,$0F,$00,$00,$FF,$27,$00,$FE,$0F,$00,$08,$00 751 | .BYTE $00,$FE,$FF,$FF,$FF,$4F,$03,$08,$C0,$FF,$FF,$1F,$00,$FC,$FF,$00 752 | .BYTE $00,$00,$00,$C0,$FF,$FF,$FF,$00,$2F,$FF,$FF,$0F,$00,$00,$00,$F0 753 | .BYTE $FF,$3F,$80,$FF,$3F,$00,$C0,$FF,$FF,$00,$00,$00,$C0,$FF,$FF,$FF 754 | .BYTE $FF,$00,$00,$00,$D0,$FF,$FF,$0F,$80,$3F,$00,$00,$C0,$FF,$FF,$FF 755 | .BYTE $FF,$FF,$00,$00,$00,$F6,$FF,$03,$00,$00,$03,$E0,$FF,$FF,$FF,$FF 756 | .BYTE $3F,$00,$00,$00,$01,$00,$FF,$FF,$FF,$F0,$7F,$00,$00,$F8,$FF,$02 757 | .BYTE $00,$00,$FF,$7F,$FC,$7F,$D6,$FF,$0F,$C8,$A9,$00,$80,$84,$08,$00 758 | .BYTE $C0,$7F,$7D,$FB,$FF,$0B,$00,$F4,$FF,$FF,$0F,$B4,$08,$F8,$FF,$BF 759 | .BYTE $00,$00,$00,$00,$00,$40,$FF,$FF,$FF,$3F,$C0,$FF,$FF,$0B,$00,$40 760 | .BYTE $FF,$7F,$00,$F4,$08,$00,$00,$C0,$FF,$FF,$00,$00,$FC,$FF,$7F,$FD 761 | .BYTE $FF,$FF,$FF,$0B,$00,$00,$00,$00,$00,$AA,$2D,$00,$FF,$FF,$00,$FF 762 | .BYTE $7F,$F6,$FF,$FF,$FF,$00,$00,$00,$00,$FE,$3F,$00,$00,$00,$40,$FA 763 | .BYTE $FF,$FF,$73,$F7,$FF,$FF,$00,$00,$00,$F4,$FF,$03,$00,$FF,$49,$FF 764 | .BYTE $FF,$00,$00,$00,$00,$C0,$FD,$FF,$FF,$FF,$03,$D8,$57,$00,$F0,$FF 765 | .BYTE $AF,$02,$00,$00,$E0,$FF,$07,$00,$00,$FF,$BF,$FE,$FF,$FF,$FF,$0B 766 | .BYTE $28,$02,$00,$00,$00,$B7,$FD,$FF,$03,$00,$00,$70,$FF,$FF,$FF,$81 767 | .BYTE $0A,$00,$D0,$FF,$FF,$FF,$27,$15,$00,$00,$00,$00,$76,$FF,$9F,$FD 768 | .BYTE $FF,$BF,$00,$FD,$FF,$BF,$00,$00,$00,$FF,$00,$00,$00,$00,$54,$03 769 | .BYTE $F0,$FF,$FF,$FF,$FF,$FF,$DF,$25,$00,$F0,$BF,$00,$00,$F0,$0F,$00 770 | .BYTE $FF,$FF,$FF,$47,$01,$00,$00,$FE,$FF,$A7,$00,$00,$40,$FF,$FF,$42 771 | .BYTE $FF,$BF,$00,$80,$FF,$02,$00,$C0,$FF,$FF,$FF,$03,$00,$00,$F0,$FF 772 | .BYTE $FF,$FF,$02,$00,$00,$80,$FF,$BF,$00,$FC,$03,$40,$FF,$FF,$3F,$00 773 | .BYTE $FC,$0B,$40,$FF,$BF,$B2,$2D,$02,$00,$00,$00,$FC,$FF,$FF,$AB,$CA 774 | .BYTE $02,$00,$FF,$FF,$FF,$FF,$FF,$00,$00,$00,$00,$FC,$FF,$00,$00,$00 775 | .BYTE $00,$FF,$FF,$FF,$FF,$FF,$BF,$00,$00,$00,$00,$FF,$FF,$3F,$00,$00 776 | .BYTE $00,$FE,$FF,$FF,$A7,$2C,$28,$00,$00,$00,$FF,$FF,$FF,$3F,$00,$FC 777 | .BYTE $77,$7D,$03,$00,$00,$FC,$FF,$03,$D0,$3F,$00,$00,$FF,$FF,$FF,$0F 778 | .BYTE $00,$00,$2F,$D1,$FF,$FF,$03,$00,$00,$09,$D8,$FF,$BF,$80,$FD,$FF 779 | .BYTE $00,$00,$F0,$FF,$CB,$FF,$FF,$03,$00,$00,$40,$FF,$FF,$03,$00,$00 780 | .BYTE $F0,$FF,$FF,$67,$2F,$00,$00,$FE,$FF,$00,$00,$F0,$FF,$FF,$4B,$92 781 | .BYTE $00,$00,$FF,$FF,$FF,$03,$00,$B7,$04,$00,$00,$00,$D0,$FF,$FF,$FF 782 | .BYTE $FF,$FF,$89,$8A,$48,$01,$00,$00,$D0,$FF,$FF,$81,$88,$F6,$FF,$FF 783 | .BYTE $FF,$FF,$01,$00,$00,$00,$F8,$7F,$00,$D5,$2F,$00,$F0,$FF,$2F,$D0 784 | .BYTE $FF,$9F,$80,$54,$00,$00,$80,$FF,$FF,$FF,$FF,$0F,$FD,$07,$00,$00 785 | .BYTE $00,$00,$F4,$FF,$FF,$03,$F0,$FF,$FF,$00,$00,$F0,$6A,$FF,$FF,$00 786 | .BYTE $00,$00,$C0,$FF,$FF,$FF,$03,$F8,$03,$40,$FF,$FF,$00,$28,$02,$00 787 | .BYTE $7C,$AB,$6A,$FF,$7F,$00,$00,$29,$82,$FA,$FF,$FF,$FF,$0B,$00,$00 788 | .BYTE $DA,$DD,$FF,$FF,$00,$00,$00,$00,$00,$F0,$FF,$FF,$FF,$FF,$00,$00 789 | .BYTE $00,$F8,$FF,$FF,$F4,$FF,$01,$00,$00,$FC,$FF,$FF,$0F,$00,$00,$00 790 | .BYTE $F0,$FF,$FF,$FF,$22,$00,$00,$F8,$FF,$FF,$0B,$00,$00,$70,$DB,$F7 791 | .BYTE $FF,$FF,$01,$00,$00,$00,$FD,$FF,$FF,$03,$00,$00,$FD,$FF,$FF,$03 792 | .BYTE $00,$40,$FF,$FF,$27,$00,$00,$FF,$FF,$02,$00,$00,$FC,$FF,$FF,$FF 793 | .BYTE $00,$00,$00,$FC,$FF,$FF,$3F,$00,$A8,$00,$00,$80,$7F,$F5,$FF,$FF 794 | .BYTE $00,$4A,$25,$D0,$FF,$FF,$FF,$02,$00,$02,$00,$7B,$57,$89,$94,$94 795 | .BYTE $92,$F6,$FF,$FF,$A7,$48,$2A,$FD,$FF,$0F,$00,$00,$00,$00,$F0,$FF 796 | .BYTE $FF,$FF,$8B,$20,$20,$2A,$DD,$A6,$68,$6B,$FF,$FF,$09,$00,$00,$00 797 | .BYTE $E0,$FF,$FF,$FF,$0F,$00,$A0,$B2,$FF,$7F,$02,$00,$00,$09,$40,$FD 798 | .BYTE $FF,$FF,$FF,$FF,$0F,$00,$00,$00,$FC,$FF,$BF,$00,$00,$00,$FF,$FF 799 | .BYTE $FF,$00,$08,$80,$FD,$9F,$48,$DF,$DA,$B7,$00,$00,$08,$F5,$FF,$FF 800 | .BYTE $3F,$00,$00,$09,$D0,$FF,$77,$DF,$27,$C9,$5D,$02,$00,$00,$F0,$FF 801 | .BYTE $FF,$7F,$00,$80,$D4,$F5,$2D,$55,$77,$95,$22,$55,$89,$80,$D0,$FF 802 | .BYTE $FF,$8F,$20,$B5,$0A,$A2,$FF,$1F,$00,$00,$FF,$57,$A2,$B6,$95,$08 803 | .BYTE $00,$FC,$FF,$FF,$AD,$5D,$09,$00,$40,$75,$57,$02,$CA,$F6,$F7,$F7 804 | .BYTE $27,$00,$80,$F6,$FF,$5F,$22,$A8,$2A,$09,$A2,$4A,$52,$DD,$FF,$FF 805 | .BYTE $3F,$00,$00,$00,$F0,$FF,$FF,$22,$08,$22,$DB,$6D,$A5,$F4,$FF,$3F 806 | .BYTE $01,$00,$00,$A0,$DA,$FF,$FF,$3F,$80,$80,$EA,$FF,$2D,$69,$6D,$09 807 | .BYTE $00,$00,$00,$FF,$BD,$FF,$FF,$FF,$01,$00,$50,$AD,$A2,$A4,$08,$6A 808 | .BYTE $FF,$FF,$97,$00,$00,$74,$FF,$7F,$57,$02,$00,$B0,$7D,$5F,$02,$60 809 | .BYTE $B5,$FF,$7F,$A7,$82,$20,$88,$FA,$F7,$B5,$22,$00,$00,$F0,$FF,$FF 810 | .BYTE $2F,$80,$D2,$AA,$FD,$DF,$02,$00,$00,$FF,$77,$AB,$CA,$24,$20,$76 811 | .BYTE $FF,$3F,$02,$00,$D0,$FF,$FF,$5F,$25,$08,$00,$52,$5B,$AB,$D6,$77 812 | .BYTE $DB,$55,$00,$00,$60,$F7,$FF,$FF,$53,$25,$22,$00,$40,$D5,$DD,$FF 813 | .BYTE $DF,$24,$82,$00,$A0,$6A,$FF,$FF,$55,$5B,$A5,$A2,$A8,$24,$88,$20 814 | .BYTE $6D,$7F,$DF,$5B,$95,$08,$92,$6A,$75,$AD,$76,$DF,$95,$84,$00,$00 815 | .BYTE $C0,$FD,$FF,$FF,$FF,$08,$00,$00,$80,$FF,$7F,$FF,$FF,$03,$00,$00 816 | .BYTE $40,$DB,$DD,$DF,$95,$00,$00,$CA,$76,$F7,$DD,$DF,$5B,$22,$55,$2B 817 | .BYTE $02,$40,$55,$6B,$DD,$F7,$25,$02,$C8,$76,$DF,$B5,$56,$29,$00,$A8 818 | .BYTE $FD,$BD,$2A,$A5,$88,$48,$4A,$DB,$5B,$AD,$DD,$FF,$BF,$00,$00,$50 819 | .BYTE $4D,$A5,$AA,$84,$80,$DA,$FF,$FF,$1F,$08,$A2,$A4,$DA,$FF,$97,$02 820 | .BYTE $22,$AB,$82,$A8,$4A,$A5,$DD,$77,$95,$20,$20,$75,$FF,$FF,$FF,$00 821 | .BYTE $00,$40,$77,$6F,$95,$4A,$8A,$48,$D5,$6D,$D5,$5A,$6D,$A5,$A8,$76 822 | .BYTE $6F,$A5,$94,$5A,$4D,$09,$00,$69,$F7,$5D,$25,$65,$55,$5B,$77,$B7 823 | .BYTE $35,$A5,$00,$00,$6A,$7B,$77,$D7,$6A,$95,$28,$D5,$54,$AA,$AA,$D4 824 | .BYTE $AA,$AA,$4A,$55,$6D,$5D,$AB,$AA,$8A,$48,$ED,$5D,$95,$22,$A4,$56 825 | .BYTE $49,$AA,$FD,$DD,$22,$02,$4A,$AD,$FD,$FD,$95,$5A,$5B,$02,$00,$20 826 | .BYTE $A9,$F6,$FF,$7F,$08,$00,$28,$75,$F7,$FF,$7F,$57,$49,$8A,$02,$02 827 | .BYTE $80,$AA,$6A,$7B,$9B,$02,$80,$FA,$FF,$FF,$FF,$BF,$00,$00,$80,$54 828 | 829 | .ORG [[. + $3F] & $FFC0] 830 | 831 | _pcm_sample2: 832 | .BYTE $D5,$12,$87,$AA,$1F,$3F,$06,$E0,$F8,$71,$FC,$00,$A8,$FF,$FB,$0F 833 | .BYTE $00,$C0,$FF,$1F,$00,$A0,$FF,$3C,$0F,$00,$F8,$01,$FE,$FF,$01,$FC 834 | .BYTE $FF,$81,$43,$00,$80,$FF,$3F,$88,$03,$C0,$FF,$17,$C0,$FA,$FF,$FA 835 | .BYTE $71,$00,$C0,$F9,$FF,$07,$00,$90,$A7,$4E,$E9,$C0,$8F,$FE,$EF,$09 836 | .BYTE $00,$E8,$FF,$4F,$00,$00,$7C,$FF,$2F,$00,$F8,$7F,$E8,$17,$00,$FC 837 | .BYTE $3F,$00,$EC,$C0,$FF,$FF,$00,$80,$FF,$43,$0B,$10,$F8,$FF,$03,$00 838 | .BYTE $BE,$EB,$FF,$05,$00,$FF,$8B,$42,$18,$A5,$7F,$D7,$09,$80,$D5,$2F 839 | .BYTE $1D,$40,$B7,$FF,$07,$C0,$4E,$2F,$45,$96,$64,$BB,$8B,$C4,$AA,$72 840 | 841 | _DPCM_IDX0 EQU [[_pcm_sample0 - $C000] >> 6] 842 | _DPCM_IDX1 EQU [[_pcm_sample1 - $C000] >> 6] 843 | _DPCM_IDX2 EQU [[_pcm_sample2 - $C000] >> 6] 844 | 845 | SECTION_ENDS E00, "PRGE APU PCM SAMPLES" 846 | 847 | SECTION_START E01 848 | 849 | _pal_bg_lib: 850 | .BYTE $0F,$36,$10,$12,$0F,$30,$10,$27,$0F,$36,$00,$16,$0F,$12,$28,$2A 851 | .BYTE $0F,$3C,$21,$12,$0F,$30,$10,$37,$0F,$36,$10,$16,$0F,$26,$39,$2B 852 | .BYTE $0F,$30,$14,$12,$0F,$39,$19,$29,$0F,$30,$28,$17,$0F,$30,$27,$08 853 | .BYTE $30,$3C,$25,$0F,$30,$3C,$11,$12,$30,$34,$24,$14,$30,$3C,$27,$06 854 | .BYTE $0F,$35,$30,$13,$0F,$35,$30,$28,$0F,$35,$30,$16,$0F,$35,$30,$1A 855 | .BYTE $0F,$3C,$10,$12,$0F,$30,$10,$37,$0F,$36,$10,$16,$0F,$12,$37,$29 856 | .BYTE $0F,$38,$27,$17,$0F,$0F,$27,$30,$0F,$2C,$19,$2A,$0F,$30,$16,$06 857 | .BYTE $0F,$30,$16,$34,$0F,$30,$11,$34,$0F,$30,$35,$14,$0F,$38,$28,$02 858 | .BYTE $0F,$30,$26,$17,$0F,$37,$2A,$12,$0F,$30,$1B,$16,$0F,$30,$15,$05 859 | .BYTE $0F,$30,$26,$17,$0F,$26,$0F,$15,$0F,$30,$2B,$12,$0F,$35,$23,$03 860 | .BYTE $0F,$30,$25,$0F,$0F,$30,$22,$26,$0F,$30,$23,$15,$0F,$12,$37,$29 861 | .BYTE $30,$0F,$37,$0A,$30,$35,$25,$15,$30,$24,$38,$0F,$30,$0F,$02,$12 862 | .BYTE $0F,$36,$10,$12,$0F,$30,$10,$27,$0F,$36,$00,$16,$0F,$12,$27,$0A 863 | .BYTE $0F,$36,$10,$12,$0F,$30,$10,$27,$0F,$36,$00,$16,$0F,$12,$27,$17 864 | .BYTE $0F,$36,$10,$12,$0F,$30,$10,$27,$0F,$36,$00,$16,$0F,$12,$28,$3C 865 | .BYTE $0F,$30,$26,$13,$0F,$30,$24,$0F,$0F,$30,$26,$28,$0F,$24,$16,$30 866 | .BYTE $0F,$30,$26,$17,$0F,$37,$2A,$12,$0F,$30,$2B,$16,$0F,$35,$23,$03 867 | .BYTE $0F,$30,$30,$08,$0F,$0F,$0F,$0F,$0F,$30,$1B,$16,$0F,$36,$26,$17 868 | .BYTE $0F,$30,$2A,$14,$0F,$32,$22,$02,$0F,$30,$26,$0F,$0F,$30,$16,$2C 869 | .BYTE $0F,$30,$30,$30,$0F,$30,$30,$30,$0F,$30,$30,$30,$0F,$30,$30,$30 870 | 871 | _pal_spr_lib: 872 | .BYTE $0F,$16,$00,$0F,$0F,$30,$35,$0F,$0F,$26,$18,$0F,$0F,$3C,$12,$0F 873 | .BYTE $0F,$15,$35,$0F,$0F,$1A,$35,$0F,$0F,$15,$27,$0F,$0F,$36,$16,$0F 874 | .BYTE $0F,$30,$15,$02,$0F,$30,$36,$0F,$0F,$26,$37,$05,$0F,$30,$30,$0F 875 | .BYTE $0F,$16,$10,$0F,$0F,$30,$35,$0F,$0F,$3C,$12,$0F,$0F,$35,$15,$0F 876 | .BYTE $0F,$30,$27,$15,$0F,$30,$27,$0F,$0F,$30,$0F,$22,$0F,$30,$22,$26 877 | .BYTE $0F,$30,$16,$34,$0F,$30,$36,$0F,$0F,$32,$17,$0F,$0F,$25,$36,$17 878 | .BYTE $0F,$0F,$16,$26,$0F,$30,$35,$0F,$0F,$26,$16,$06,$0F,$30,$16,$06 879 | .BYTE $0F,$30,$0F,$17,$0F,$30,$35,$0F,$0F,$30,$0F,$12,$0F,$0F,$0F,$0F 880 | .BYTE $0F,$0F,$30,$0F,$0F,$30,$35,$0F,$0F,$30,$0F,$12,$0F,$0F,$0F,$0F 881 | .BYTE $0F,$15,$35,$0F,$0F,$1A,$35,$0F,$0F,$15,$27,$0F,$0F,$1A,$23,$0F 882 | .BYTE $0F,$15,$35,$0F,$0F,$1A,$35,$0F,$0F,$15,$27,$0F,$0F,$23,$39,$0F 883 | .BYTE $0F,$16,$30,$28,$0F,$16,$30,$28,$0F,$16,$30,$28,$0F,$16,$30,$28 884 | 885 | _pal_anim_table: 886 | .BYTE $36,$36,$36,$36,$36,$36 887 | .BYTE $26,$26,$26,$26,$26,$26 888 | .BYTE $16,$16,$16,$16,$16,$16,$16,$16 889 | .BYTE $06,$06,$06,$06,$06,$06 890 | .BYTE $16,$16,$16,$16,$16,$16,$16,$16 891 | .BYTE $26,$26,$26,$26,$26,$26 892 | 893 | ; REUSED: calcs used, moved from PRG5 894 | ; a lot of map buffers pos calculations are calculated with hardware MUL usage, 895 | ; however, to speed up we may use similar tables instead mul+add, 896 | ; 897 | _city_map_row_pos_list_lo: 898 | .BYTE <[_city_map+(76*0)] 899 | .BYTE <[_city_map+(76*1)] 900 | .BYTE <[_city_map+(76*2)] 901 | .BYTE <[_city_map+(76*3)] 902 | .BYTE <[_city_map+(76*4)] 903 | .BYTE <[_city_map+(76*5)] 904 | .BYTE <[_city_map+(76*6)] 905 | .BYTE <[_city_map+(76*7)] 906 | .BYTE <[_city_map+(76*8)] 907 | .BYTE <[_city_map+(76*9)] 908 | .BYTE <[_city_map+(76*10)] 909 | .BYTE <[_city_map+(76*11)] 910 | .BYTE <[_city_map+(76*12)] 911 | .BYTE <[_city_map+(76*13)] 912 | .BYTE <[_city_map+(76*14)] 913 | .BYTE <[_city_map+(76*15)] 914 | .BYTE <[_city_map+(76*16)] 915 | .BYTE <[_city_map+(76*17)] 916 | .BYTE <[_city_map+(76*18)] 917 | .BYTE <[_city_map+(76*19)] 918 | .BYTE <[_city_map+(76*20)] 919 | .BYTE <[_city_map+(76*21)] 920 | .BYTE <[_city_map+(76*22)] 921 | .BYTE <[_city_map+(76*23)] 922 | .BYTE <[_city_map+(76*24)] 923 | .BYTE <[_city_map+(76*25)] 924 | .BYTE <[_city_map+(76*26)] 925 | .BYTE <[_city_map+(76*27)] 926 | .BYTE <[_city_map+(76*28)] 927 | .BYTE <[_city_map+(76*29)] 928 | .BYTE <[_city_map+(76*30)] 929 | .BYTE <[_city_map+(76*31)] 930 | .BYTE <[_city_map+(76*32)] 931 | .BYTE <[_city_map+(76*33)] 932 | .BYTE <[_city_map+(76*34)] 933 | .BYTE <[_city_map+(76*35)] 934 | .BYTE <[_city_map+(76*36)] 935 | .BYTE <[_city_map+(76*37)] 936 | .BYTE <[_city_map+(76*38)] 937 | .BYTE <[_city_map+(76*39)] 938 | .BYTE <[_city_map+(76*40)] 939 | .BYTE <[_city_map+(76*41)] 940 | .BYTE <[_city_map+(76*42)] 941 | .BYTE <[_city_map+(76*43)] 942 | .BYTE <[_city_map+(76*44)] 943 | .BYTE <[_city_map+(76*45)] 944 | .BYTE <[_city_map+(76*46)] 945 | .BYTE <[_city_map+(76*47)] 946 | .BYTE <[_city_map+(76*48)] 947 | .BYTE <[_city_map+(76*49)] 948 | .BYTE <[_city_map+(76*50)] 949 | .BYTE <[_city_map+(76*51)] 950 | .BYTE <[_city_map+(76*52)] 951 | .BYTE <[_city_map+(76*53)] 952 | .BYTE <[_city_map+(76*54)] 953 | .BYTE <[_city_map+(76*55)] 954 | .BYTE <[_city_map+(76*56)] 955 | .BYTE <[_city_map+(76*57)] 956 | .BYTE <[_city_map+(76*58)] 957 | .BYTE <[_city_map+(76*59)] 958 | .BYTE <[_city_map+(76*60)] 959 | .BYTE <[_city_map+(76*61)] 960 | .BYTE <[_city_map+(76*62)] 961 | .BYTE <[_city_map+(76*63)] 962 | .BYTE <[_city_map+(76*64)] 963 | .BYTE <[_city_map+(76*65)] 964 | .BYTE <[_city_map+(76*66)] 965 | .BYTE <[_city_map+(76*67)] 966 | .BYTE <[_city_map+(76*68)] 967 | .BYTE <[_city_map+(76*69)] 968 | .BYTE <[_city_map+(76*70)] 969 | .BYTE <[_city_map+(76*71)] 970 | .BYTE <[_city_map+(76*72)] 971 | .BYTE <[_city_map+(76*73)] 972 | .BYTE <[_city_map+(76*74)] 973 | .BYTE <[_city_map+(76*75)] 974 | _city_map_row_pos_list_hi: 975 | .BYTE >[_city_map+(76*0)] 976 | .BYTE >[_city_map+(76*1)] 977 | .BYTE >[_city_map+(76*2)] 978 | .BYTE >[_city_map+(76*3)] 979 | .BYTE >[_city_map+(76*4)] 980 | .BYTE >[_city_map+(76*5)] 981 | .BYTE >[_city_map+(76*6)] 982 | .BYTE >[_city_map+(76*7)] 983 | .BYTE >[_city_map+(76*8)] 984 | .BYTE >[_city_map+(76*9)] 985 | .BYTE >[_city_map+(76*10)] 986 | .BYTE >[_city_map+(76*11)] 987 | .BYTE >[_city_map+(76*12)] 988 | .BYTE >[_city_map+(76*13)] 989 | .BYTE >[_city_map+(76*14)] 990 | .BYTE >[_city_map+(76*15)] 991 | .BYTE >[_city_map+(76*16)] 992 | .BYTE >[_city_map+(76*17)] 993 | .BYTE >[_city_map+(76*18)] 994 | .BYTE >[_city_map+(76*19)] 995 | .BYTE >[_city_map+(76*20)] 996 | .BYTE >[_city_map+(76*21)] 997 | .BYTE >[_city_map+(76*22)] 998 | .BYTE >[_city_map+(76*23)] 999 | .BYTE >[_city_map+(76*24)] 1000 | .BYTE >[_city_map+(76*25)] 1001 | .BYTE >[_city_map+(76*26)] 1002 | .BYTE >[_city_map+(76*27)] 1003 | .BYTE >[_city_map+(76*28)] 1004 | .BYTE >[_city_map+(76*29)] 1005 | .BYTE >[_city_map+(76*30)] 1006 | .BYTE >[_city_map+(76*31)] 1007 | .BYTE >[_city_map+(76*32)] 1008 | .BYTE >[_city_map+(76*33)] 1009 | .BYTE >[_city_map+(76*34)] 1010 | .BYTE >[_city_map+(76*35)] 1011 | .BYTE >[_city_map+(76*36)] 1012 | .BYTE >[_city_map+(76*37)] 1013 | .BYTE >[_city_map+(76*38)] 1014 | .BYTE >[_city_map+(76*39)] 1015 | .BYTE >[_city_map+(76*40)] 1016 | .BYTE >[_city_map+(76*41)] 1017 | .BYTE >[_city_map+(76*42)] 1018 | .BYTE >[_city_map+(76*43)] 1019 | .BYTE >[_city_map+(76*44)] 1020 | .BYTE >[_city_map+(76*45)] 1021 | .BYTE >[_city_map+(76*46)] 1022 | .BYTE >[_city_map+(76*47)] 1023 | .BYTE >[_city_map+(76*48)] 1024 | .BYTE >[_city_map+(76*49)] 1025 | .BYTE >[_city_map+(76*50)] 1026 | .BYTE >[_city_map+(76*51)] 1027 | .BYTE >[_city_map+(76*52)] 1028 | .BYTE >[_city_map+(76*53)] 1029 | .BYTE >[_city_map+(76*54)] 1030 | .BYTE >[_city_map+(76*55)] 1031 | .BYTE >[_city_map+(76*56)] 1032 | .BYTE >[_city_map+(76*57)] 1033 | .BYTE >[_city_map+(76*58)] 1034 | .BYTE >[_city_map+(76*59)] 1035 | .BYTE >[_city_map+(76*60)] 1036 | .BYTE >[_city_map+(76*61)] 1037 | .BYTE >[_city_map+(76*62)] 1038 | .BYTE >[_city_map+(76*63)] 1039 | .BYTE >[_city_map+(76*64)] 1040 | .BYTE >[_city_map+(76*65)] 1041 | .BYTE >[_city_map+(76*66)] 1042 | .BYTE >[_city_map+(76*67)] 1043 | .BYTE >[_city_map+(76*68)] 1044 | .BYTE >[_city_map+(76*69)] 1045 | .BYTE >[_city_map+(76*70)] 1046 | .BYTE >[_city_map+(76*71)] 1047 | .BYTE >[_city_map+(76*72)] 1048 | .BYTE >[_city_map+(76*73)] 1049 | .BYTE >[_city_map+(76*74)] 1050 | .BYTE >[_city_map+(76*75)] 1051 | 1052 | SECTION_ENDS E01, "COMMON DATA AND TABLES" 1053 | 1054 | BANK_END FE,$E000 1055 | -------------------------------------------------------------------------------- /doc/notes.txt: -------------------------------------------------------------------------------- 1 | 2 | MISC GAME INFO 3 | 4 | MISC#1. There is an automatically spawned helicopter for observing the road traffic if you build an Air Port. It flies randomly and every iteration its coordinates tested against the traffic map. If helicopter hovering over the traffic location with density above 9 it will report about it with DPCM speech and a scroller message. Judging from the message index (18th, the last one in the list) and the fact that all previous messages aren't used at all, we may presume that this heli message and sound were added to the game at the late stage of development. However, method of calling this message is the same as in Micropolis sources. 5 | MISC#2. The game engine consists of two main separate parts. First is an interface and display control part or game engine. It handles all inputs, menus, drawing graphics, screen objects/sprites manager. The second is a city control and statistics collector part or simulation engine. It does all city specific calcs on population, industry, energy, pollution and traffic, does stats and charts for info displays, etc... Both parts constantly do its own work in loops, never stop. The most interesting part, the threads manager in NMI handler switches between two process through stack manipulation, so both work some kind like in a parallel threads. The game engine has a priority on simulation engine. If you press any button, it will take control instantly, and city calcs set on hold. However, simulation engine can enter some kind of critical sections, which may protect the simulation calculations from accessing from the game engine. Haven't seen such engine in any game before. Usually threading methods used in a scripted engines. This is the first game that do it on the native code. Basically, this method can be used for multi-threading operation systems for NES, the problem is only in a very small stack. 6 | MISC#3. For some reason until you get the City Status and build a Bank, you have only 3 free Special events slots. The rest of the game you'll have 4 slots. However, if all your slots are full, any pending events will wait until any empty slot appears. 7 | MISC#4. The word "ISHI" is used as a RAM signature for Soft/Hard Reset test. Most probably this is the name of the developer which made the SNES version too. 8 | MISC#5. All music tracks are used in the game. Most of tracks used to highlight the town population/status. Some tracks are "paired" and consists of two conjuncted parts, an intro and a looped main track (ie 01/02 - title, 08/10 - practice, 48/50, 60/40 - information). 9 | MISC#6. One of the tables in the Sound engine used for calculating note lengths is the same as in Nintendo games Baloon Fight, Duck Hunt, Gumshoe, Gyromite, Hogan's Alley, Stack Up and Wrecking Crew. Definitely, the sound engine was based on the engines for these games. All of them has similar way to play SE by setting flag bits and so on. However, as against the sound engine of Wrecking Crew for example, this one written highly briefly, and little bit simplified. There is no channel data and code optimization, a different set of commands, lack of the loop commands at all, so music data and code incompatible and took a lot more space in ROM. 10 | MISC#7. With the Micropolis source codes it is easier to understand some odd things in the NES code, most of this described in the comments of BFS version. The simulation core of Micropolis engine were taken mostly exactly the same with some small insignificant changes due to optimizations or rough fixed point rounding errors. 11 | MISC#8. Map generation routines for New City mode also taken from Micropolis sources as is with some additional optimizations for NES specific cases. 12 | MISC#9. The power generated by all power stations equals (COAL*700)+(NUCLEAR*2000) points. This power "distributed" between every single powerable tiles including the Powers station and electric wires. Every single powerable tile (all tiles of buildings, electric wires) consume 1 point. Due to optimization rather than bug the recursive algorithm can overpower some tiles inside the buildings or at intersection of wires up to 3 times. So the same amount of buildings may consume more or less power just because of placement and grouping of power wires. Average consumption for 3x3 building is 13, not 9. The original Micropolis core has exactly the same algorithm. 13 | MISC#10. Although the Difficult setting non functional in original game (see BUGS#20) there are some portions of the code that depends on Difficult setting. 14 | MISC#15.1 Starting amount of money on Easy is 20000, on Normal - 10000, and 5000 on Hard. 15 | MISC#15.2 Tax Rate value higher to 1 on Normal and to 2 on Hard modes while calculating the RCI growth values of the City. So you may have Tax Rate at 7, but the RCI levels will be calculated as if it 8 on Normal or 9 on Hard correspondingly. 16 | MISC#15.2 Fund requested for transport calculated as (roads+(rails*2))*coeff. Where coeff = 0.7 for easy, 0.9 for Normal and 1.2 for Hard. Eexactly as in Micropolis sources. 17 | MISC#15.3 Overall tax collected value calculated as (R_L+C_L+I_L)*overall_city_value*coeff*0.71*year_tax_rate. coeff = 1.4 for Easy, 1.2 for Norman and 0.8 for Hard. Also exactly as in Micropolis sources. 18 | CODES 19 | MISC#11. There are some special secret button codes in the NES version. 20 | MISC#11.1 At any time during the game, press "A + B + Select + Start" on pad 1 to Soft Reset. 21 | MISC#11.2 At the title screen, press "A + B + Up + Left" on pad 2 to clear SRAM data. 22 | MISC#11.3 During the game in any mode, at any message window (disasters, hints, information), enter two different button codes in any order. Each raises its own special cheat flag: CODE#1 Press "A + B + Up + Down + Left + Right" once. Since you couldn't press all the D-Pad buttons at once on a single pad, at least two D-Pad buttons should be pressed on pad 1 and two on pad 2 (for example, "Up + Left" on pad 1 and "Down + Right" on pad 2, or "Down + Left" on pad 1 and "Up + Right" on pad 2, etc...). The "A" and "B" buttons on pad 1 works like a skip/quit commands so you may use them only if you already did another code before, but if you doing this code first, use only pad 2 for "A + B" combination. CODE#2 The other code have no strict button combination. The main goal here is to have at least two identical buttons held on both pads at the same time (except "A" and "B", since you will close the window before can finish the code) and then press one more additional button on pad 1 (you may use any additional button here, but as mentioned above, you may use "A" or "B" only if you've done another code before). Easiest way here is to hold "Up" for example on both pads and then press "Left" on pad 1. When done, you must leave the message window in order to complete the cheat test sequence. If all done right, a message "I AM GOD I WISH YOU HAPPY" will be displayed. To disable the debug mode, do the same operations one more time and another message will appear then: "I AM GOD DEBUG OFF". The debug mode makes some changes to the gameplay: 23 | MISC#11.3.1 All constructions cost no money. However, the budget income/outcome still work. 24 | MISC#11.3.2 Be able to place any number of buildings at any position without collision check (causes a lot of glitches if heavily abused). 25 | MISC#11.4.ADDED(BFS) You might not know this but any of 5 small menu windows with the game settings or info (SPEED, OPTIONS, DISASTER, WINDOWS, GAME) can be moved across the screen. To do this, put cursor to the upper-left corner of the window, hold A, then move it with D-Pad buttons. Each window will memorize its last position for the rest of the current game. However, the windows positions can't be saved and lost when exit from the game (the BFS version currently able to save that positions). 26 | MISC#12. Destruction/corruption logic for map objects avoid corruptions of the raw bulldozed grounds. Only flood as a special case can corrupt it. Why at least nuclear pollution can't do the same? 27 | MISC#13.TODO The Monster appearance logic (see BUGS#15) doesn't use high pollution zones as a destination point as stated in the Scenario message and as actually work in the original Micropolis code. For random disaster the starting and destination points are random. For scenario disaster the Monster appears near the center in a square including Imperator's Palace and walk toward the sea. The area it crosses then mostly the industrial zone so has a high pollution ratio. So the Monster following the rule somehow. 28 | MISC#14.FIXED(BFS) Judging from the Micropolis sources the Drive test for traffic calculation tries to drive from R to C and I areas, from I back to R, but for some reason from C either to R, C and I. The same behaviour ported to the NES version. So most of the C areas does not generate any traffic unless they are in a particular position near the other areas and as a side effect this not interfere with development of C areas. 29 | MISC#15. Surprisingly, the random trees in the park tiles are animated just like the fire. However, all 4 animation tiles are the same so you wont't see a difference. 30 | MISC#16. The real in-game taxes rates are calculated once at the end of the fiscal year. This means if you want to change funding at the budget screen, you must then wait for the next year to apply settings. You just can't change them any time or free some money by redistributing taxes. 31 | MISC#17.FIXED(BFS) The PPU data transfer for regular and extendex name tables are separated long enough in the NMI handler for some reason which causes random garbage on the screen when one ppu data already set but the rest is not. Maybe there is the case when it needed, maybe need more tests. 32 | 33 | WHAT'S UNFINISHED IN THE GAME 34 | 35 | UNFINISHED#1. There are 6 regular scenarios available at the beginning. When you beat 6 regular scenarios, two additional scenarios will be available: "Las Vegas UFO" and "Freedom". 36 | UNFINISHED#1.2.TODO "Traffic in Bern" scenario seems totally non functional. The initial high traffic quickly calms down when city stabilizes and stopping its growth. So average traffic value here always lower than need to fail this scenario. You will always win even if roads are deteriorating (no roads, no traffic!). Also, as against other game parameters re-calculated in real-time mode only the traffic average calculated once per year with overall city problems recalculations. 37 | UNFINISHED#1.2.TODO Both additional scenarios have no briefing texts and window headers, only blank windows. 38 | UNFINISHED#1.3.TODO Also both have no completing conditions, both are infinite and cannot be completed. 39 | UNFINISHED#1.4.TODO Scenario "Las Vegas UFO" should have an UFO object as a disaster judging from its name. The CHR ROM contains two set of tiles for two frames of the large UFO animation with a tractor beam. However, there aren't any other mentions in the game messages nor the game code for such type of disasters/objects. There is no sprites data associated with it as well. It is just not implemented at all. 40 | UNFINISHED#1.5.ADDED(BFS) Scenario "Freedom" have proper map data but have no any proper scenario parameters to load. So all flags, money amount, game settings are be semi-random at start. 41 | UNFINISHED#2. There are 5 name buffers inside 42 | UNFINISHED#2.1 First is your town name, default name "SIMCITY". 43 | UNFINISHED#2.2.TODO Second is what you enter as a favorite word, used as a sister town name during the game in New Town mode, if not entered, used the default name. In practice and scenario modes is blank, so message about sistership of towns will lack the name of the City at all. 44 | UNFINISHED#2.3.TODO Third name used as the Bank name in the message resources but never initialized with any value, always blank, the same as with blank sister town name. 45 | UNFINISHED#2.4.REMOVED Two more are unused completely. 46 | UNFINISHED#3.ADDED(BFS) One of the SE effects unreferenced and there is not known where it should be used. (DEMO GG for original version: AKOXTGAA+YSXZPKAP. Replaces one of the used sounds with it, write $08 to $00F1 address in RAM to hear a new one). 47 | UNFINISHED#3.1.TODO Another unused sound can be heard by setting var $F2 to value $10. Some kind of low alert buzzer. Maybe for unclear meltdown alert which has no any special indication otherwise 48 | UNFINISHED#3.2.TODO For one more unused sound set $F2 to value $80. A kind of click or cancel sound. 49 | UNFINISHED#4. There are total 25 messages for scroller line at the game's HUD. Only 16 are handled by the game engine. The used ones are: from $0 to $F (except $B "Blackouts") and $18 (starting from a custom handler). The rest aren't used and were just derived from the original Micropolis sources. Most of original messages not presented in this messages are converted to in-game alert window messages, except one (see below). 50 | UNFINISHED#4.1.TODO 0B "BLACKOUTS REPORTED CHECK POWER MAP", when _powered_areas/_stats._total < 0.7. In current NES code there is an unused variable which counts exactly a number of powered areas, but the scroll message handler for it is missing. 51 | UNFINISHED#4.2 10 "A PLANE HAS CRASHED", converted to alert window message. 52 | UNFINISHED#4.3.TODO 11 "SHIPWRECK REPORTED", 12 "A TRAIN CRASHED", 13 "A HELICOPTER CRASHED", the rest of crashes from original source not implemented here. There were a lot of various cases to damage vehicles like by Tornado/Monster collisions, random crashed when disasters are enabled, etc in the original Micropolis code. 53 | UNFINISHED#4.4.TODO 14 "UNEMPLOYMENT RATE IS HIGH", not used even in the Micropolis sources. 54 | UNFINISHED#4.5.ADDED(BFS) 15 "YOUR CITY HAS GONE BROKE", used in Micropolis when in Autobudget mode Current money plus Taxes collected aren't enough to fully fund all structures. In the NES code there is an unfinished branch for this, see UNFINISHED#23. 55 | UNFINISHED#4.6.ADDED(BFS) 16 "EXPLOSION DETECTED", explosion were used for either the disasters when damaging the Building, combined with vehicles crashes usually. 56 | UNFINISHED#4.7.ADDED(BFS) 17 "BROWNOUTS BUILD ANOTHER POWER PLANT", when power consumption calculated with power grid map calculation exceeded the amount of generated power by all power plants combined (see equation in MISC#9 section). 57 | UNFINISHED#5. There are currently 3 different kind of vehicles visible on the map: a Heli, an Airplain and a Train (its indexes correspondingly 0, 1 and 3). The missing vehicle object with index 2 has most of its code programmed. Judging from the unused CHR data tiles this should be a Ship. The map overview mode displaying all vehicles as a small letters. For used vehicles has accordingly "H" (Heli), "A" (Airplane) and "R" (tRain). Unused vehicle should be displayed as "S" (Ship) correspondingly. 58 | UNFINISHED#5.1.ADDED(BFS) There is an unfinished leftover code from an old attempt to calculate the starting position for unused Ship vehicle. It executes every time when the game engine counts sea ports and trying to search for a specific tile in the map buffer ($FE) then it should set the starting position of the ship, which never used because there is no Ship deploy code in the ROM at all. This also takes a lot of redundant CPU cycles. 59 | UNFINISHED#5.2.TODO The search loop stop conditions in UNFINISHED#5.1 uses the buffer size instead of the end of the buffer offset so this loop may search through all CPU space, wrap to RAM and ends something in RAM MIRROR area but can stop earlier because there are some $FE bytes in the PRG code. 60 | UNFINISHED#5.3.ADDED(BFS) In any cases, all mentioned code doesn't calculate the correct Ship position, just the last position of the Sea port, which isn't correct, because usually, the $FE tile routes doesn't connected with the Sea ports and ship would just stuck inside the Port or on the ground near it. 61 | UNFINISHED#5.4.TODO The special water tile $FE used only in one map for Detroit Scenario even while other scenarios has the Sea Ports as well. The New City mode can generate routes automatically for river-types of the maps, and does not generate them for isle-type maps. So We couldn't see the ship for many of maps used in game, even if there is a port. 62 | UNFINISHED#5.5.TODO Only two portions of code are looking for a special water tiles. The ship retarget routine in objects handler and the build routines in construction engine. The second one replaces $FE with special road tile called "bridge" (see APPEND C) to keep the water routes. However, the rest of the code does not aware about special "bridge" tiles or special water tiles to make all this stuff working together properly. Most probably this special bridges is for unimplemented drawbridges which appears only in the SNES version later. The only evidence of this is UNFINISHED#10 63 | UNFINISHED#5.6.FIXED(BFS) The unused Ship vehicle has two sets of sprites for years before and after 1950. Sprites 5 and 6 of the first set are broken, as well as sprite 3 of the second set. 64 | UNFINISHED#6.REMOVED In the data for in-game menus there are two unused "YES/NO" windows: "DO YOU QUIT PLAYING WITHOUT SAVING?" and "DO YOU WANT TO START NEW CITY?". Both unused. In all cases except "LOAD GAME" the common "SAVE GAME" menu used instead. 65 | UNFINISHED#7.TODO Every year, the current state of city parameters are stored in the graphs arrays. Since all values used here are fixed point, they attempt to scale them down to 8-bit fixed values, also calculate the max value for further scaling. However, this scaling value never used, the actual graphs display routine calculate it's own max value and scaling factor for each graph independently. 66 | UNFINISHED#8.TODO Auto Budget setting in Options does nothing. Budget is planned and trimmed automatically always and the Budget screen can't be disabled or skipped during the game. 67 | UNFINISHED#9.ADDED(GG LEVAUPPA) Helicopter sprite contains a 4 frame animations of the flight for every movement direction. However, only two of four used for some reason. 68 | UNFINISHED#10. There are a lot of unused CHR data for BG objects, presumably intended to be changed according to current date or scenario type. Here is mostly complete list of most significant unused tiles. Bank numbers are in 4K units, so full tile indexes are exact MMC5 ppu data needed to display a particular tile. First number is a rectangular area top-left index, then size of rectangular area in tiles horizontally and vertically. Unused sprites are described in other section where they belongs. Most of unused sprites can be re-added and used except an UFO sprite. 69 | - BANK01 5D 1x1 - Unused second type of rubble ground tile. 70 | - BANK01 A8 8x4 - Unknown frames or structures in different shades. 71 | - BANK03 60 8x2 - "CLEAR" tablet, probably for clear scenarios. Another larger cross-type version is used. 72 | - BANK03 A4 6x1 - "GRAPHS" with small letters. 3x1 tile fonts used there instead. 73 | - BANK03 D0 6x1 - "GO TO" 3x2 for BG button, sprite 2x2 used instead. 74 | - BANK04 20 2x2 - Unused info maps button, judging of placement this is an older version of pushed exit button which currently uses a man running picture and has no push animation. 75 | - BANK04 F0 15x1- Unused small text for either evaluation or overview screens: "Current funds", "Tax rate", "Loans". 76 | - BANK05 70 10x2- Three small texts for budget screen: "Amount owed", "Amount paid", "Interest rate". 77 | - BANK05 F9 7x1 - One more unused overview or budget screens text: "Credit rating". 78 | - BANK06 E3 5x1 - Scenario screen unused text: "Hamburg 1944", a leftover of early version, same scenario were in original Micropolis. 79 | - BANK06 95 2x1 - "Built", part of building names for HUD on the black BG. The game never used past time in it's messages. 80 | - BANK07 69 4x1, 81 | 5C 3x1, 82 | 7C 2x1, 83 | E9 3x1 - A set of tiles for open bridges. 84 | - BANK07 8C 4x4 - Airport Terminal 2 building. An airport terminal does not change in the SNES version also. 85 | - BANK07 CC 4x4 - Airport Terminal 3 building. 86 | - BANK08 0D 2x6, 87 | 56 2x1 - A large pillar for bank screen, a smaller ones are used only. 88 | - BANK08 A0 6x1 - Two more copies of "Amount owed/paid" for early bank screen layout. 89 | - BANK08 C4 4x1, 90 | B7 1x1 - "Initial funds" another unused bank screen text. 91 | - BANK08 C0 9x4 (complete set of two more frames of high traffic animations for all kind of ground roads) 92 | - BANK08 DA 3x1, 93 | E9 7x2, 94 | CF 1x1, 95 | 39 1x1 - Traffic animation tiles (4 frames for 4 different tiles) for water roads and bridges. 96 | - BANK09 C0 2x2 - Unused config icon for UNFINISHED#6 option menu. 97 | - BANK0A 52 1x8 - "Start new game" description text for config icon for UNFINISHED#6 option menu. 98 | - BANK0A D6 2x2 - Bank icon with frame for one of the config menus also. 99 | - BANK0B 80 2x2 - Part of stadium from BANK15. 100 | - BANK12 34 3x3 - Botanical Garden 2 present building. 101 | - BANK12 3D 3x3 - White House 2 present. The White House is different for every City type in SNES version. 102 | - BANK12 60 3x3 - White House 3 present. 103 | - BANK12 63 3x3 - White House 4 present. 104 | - BANK12 89 7x1, 105 | 90 1x1 - "Botanical Garden", a description text of unused present for menu. 106 | - BANK12 9C 4x1 - "Station", a part of present building names for HUD on the black background. Only single "Present" used for all presents. 107 | - BANK15 00 9x1 - Set of tiles to draw rounded frame on the white background with "W:" letter, usage is unknown. 108 | - BANK15 49 1x1 - Part of "Water Way Ar[ea]" text: "ea" not fit into the string and left unused. 109 | - BANK15 4A 5x1 - Copy of "Total area" text with different spacing. 110 | - BANK15 79 3x1, 111 | 80 16x4, 112 | DB 1x1, 113 | DC 4x3 - Complete sets for Race Track and two different Baseball stadiums buildings along with animation frames. A small portion of it also in BANK0B. 114 | - BANK16 00 16x2, 115 | 20 1x1, 116 | 23 5x1, 117 | 2F 1x1 - A couple of present building names for HUD on the black background for "Monument", "Bank" "White House", "Boranical garden", "Amusement park", "Casino", "Zoo", neither of them are used as well. 118 | - BANK19 C6 4x4 - Two set for something like thin frame wondows. 119 | UNFINISHED#11. Message windows during the game has a various animation sequences depending on current message. There are 19 sequences are used for 10 scenes. Sequences 6 to 11 intended to be used in 4 additional scenes but they isn't. To see each of 4 unused scenes use FIX GG codes and open default hint window during the game by pushing to the "HINT" button. The evidence that the game should have 4 more hint messages is that there are two of the arrays has 40 entries instead of 36 (the number of hint messages currently, see APPEND A below). 120 | UNFINISHED#11.1.TODO(GG ZAEAPGPA+TANAPGLA+YANAZGGA) Scenes 6-7. Uses the same sprites as for Traffic Jam message, but the "Mayor" character stands still at the rightmost window size and constantly looking to the left sweating. The closed door animation in the center of the window which someone ramming from the outside. Sprites of it never appear elsewhere. Both animated sprites together exceeded the 8 sprites per line limit and thus the "Mayor" missing part of its face. In the Micropolis sources there is an unused as well message string "They are rioting the streets!!", but there are no such warnings in current version at all. In the SNES version this animation used for common problems alert screens and hints. 121 | UNFINISHED#11.2.TODO(GG AANAPGLE) Scene 8. The "Mayor" character stand with his back toward us. Sprites never used before. Animation very short. Usage isn't clear. 122 | UNFINISHED#11.3.TODO(GG PANAPGLE) Scene 9. The mayor character at the middle of the screen with crutch and a bandage on its head, explaining something. Sprites aren't used anywhere else also. Most probably should be used for warnings about disasters or low funding of medicine. 123 | UNFINISHED#11.4.TODO(GG ZAEAPGPA+ZANAPGLE+LANAZGGE+LUEZYALU) Scenes 10-11. The "Mayor" character constantly running from the left side to the right side of the window. The green cloud is floating after him. Most probably this animation is for pollution warning message. Also exceeded the 8 sprites limit at some point. In any case, there aren't messages of pollution warning in the game. 124 | UNFINISHED#12. While build transport and power lines on the Water, there are no code for testing a valid bends with water type of tiles. You can do only straight lines continuing other straight lines. Can't bend the road on the water. Just can connect with another straight line starting from the grounds. The SNES version still not implemented this. 125 | UNFINISHED#13.FIXED(BFS) The New city generator screen has 6 small triangle buttons at the bottom-right corner for selecting the map number. There are two tiles for drawing the regular and pressed buttons. There even has some portions of code that loads pressed button tile indexes. But then code goes to number rotate animation code and the pressed button tiles are never showed. The problem was that the button anim code reside in external bank and the FAR call routine uses the tmp values at $000,$001,$002 addresses in RAM, the same addresses used by the number display routine to store an actual decimal value. So they just removed one extra call for the sprite, fixed the glitch but disabled the button pressing animation. 126 | UNFINISHED#14.TODO Unless the SNES version, the NES does not explode Nuclear Power stations randomly for Normal/Hard modes. The Nuclear Meltdown only available for BOSTON scenario and even has no Alert message corresponding to it. Nuclear meltdown occurs with only a sound and "GOTO" button activated. 127 | UNFINISHED#15. There is an unused unreferenced type of Fire disaster which fires half of the Fire disaster tiles on the map at once. In the original Amiga/DOS/C64 versions there was a Scenario for Hamburg Germany 1944 Bombing. There is no such disaster in later version of this game (but there were screens on earliest versions), but such unreferenced type of disaster clearly evidence that they planned it somehow at some point. 128 | UNFINISHED#16. There is an unused music command in a music engine code that adds a different type of envelope calculation to the note. If you replace all regular notes with such alt enveloped this will sounds like under water or maybe like in UFO-style. No music sequences are using it at all. Probably this is a leftover of the unimplemented UFO object? 129 | UNFINISHED#17.TODO Pollution value calculated once per THREAD1 loop, but used currently only for calculating overall city problems list. Never used for any alerts display as well as not used for Graph screen because of BUG#23. 130 | UNFINISHED#18.FIXED(BFS) RAM addresses $5F6/$5F7 in the main city data array never used by any part of the game. However, they reside at the beginning of average states of the city. The only missing average here is Traffic Level average, which currently assigned to other RAM address $656. 131 | UNFINISHED#19.TODO Unless the SNES version, Casino present in this game does not add a special income to the cash flow. 132 | UNFINISHED#20. The unused tiles with indexes $ED-$FC represents the drawbridge tiles in opened state. The same drawbridges implemented in the SNES version, they may be opened or closed depending on time. There is no code for this in the NES version at all. 133 | UNFINISHED#21.TODO Roads included in pollution calculation as an entities of value on the map, but has no impact in overall pollution value because in the NES version there is no possible to fetch animation tile with traffic which used in original Micropolis source. So traffic does not counts at all now. 134 | UNFINISHED#22.ADDED(BFS) The road tiles for water bridges E0-E1 and EB-EC does not have a road flag set in _map_tiles_flags_tbl. So as a result they can't be used as a transport routes when traffic is calculated and you can't get any growth near them. However, this done by purpose. When drivable, these roads will collect a traffic as well and must be animated. But due to method of data fetching, there are possible only 16 different tiles to be animated. 15 already taken by regular roads. One more left, but we need TWO more. So we may animate only one of the bridge roads. To animate more we need to additional fetch routine or change method of calculating the current one. 135 | UNFINISHED#23.FIXED(BFS) Funding calcs can't drop cur money to negative value, they are always calculated with clamp to 0. However, if we loan the amount of loans will be decremented from 0 and then we get the unsupported negative value. There is an unfinished branch where a special flag is set, when we out of money, but it not used anywhere and does nothing with a negative value. 136 | 137 | ORIGINAL GAME BUGS 138 | 139 | BUGS#1.FIXED(BFS) Var at $6CC RAM address is a temporary variable used in many places of the program to store intermediate calc data. However, most of the time it has a value of POWER STATIONS counter, which is calculated every game iteration. This var used exactly as a POWER STATIONS count for the warning scrolled messages tests. Although it used for calculations at the end of the fiscal year and has a semi-random value immediately after the year budget screen is closed, this has no really significant effect to the game and message triggering except the case this semi random value gets ZERO, which is rarely possible. 140 | BUGS#2. Use the turbo button A on some input screens to glitch the screen because of ppu queue buffer overflow due to lack of proper sync. CANNOT BE PATCHED 141 | BUGS#2.1.FIXED(BFS) Name input screen. 142 | BUGS#2.2.FIXED(BFS) Budget money adjust screen. 143 | BUGS#3.FIXED(GG GESLGPTZ) There is an unused disabled code in Practice mode events handler which checks if you go well or bad during this game mode. This branch should check your town population after year 1905 (should be 30000), then send a message if you did it well or you need more practice. For some reason they decided to disable it or just make bug in a selection logic. 144 | BUGS#4.FIXED(BFS) Some events haven't appear automatically when you get it (see table below) due to some sort of hardly visible bug with indexes comparisons. In case you get this bug, you need to open Hints window manually in order to obtain a Special item. Most of events works just fine, there only 2 of them which are affected. With this bug you may loose your current present if any other message appear before you go to the Hint screen. 145 | BUGS#5.FIXED(BFS) The extra scenarios selecting screen code trying to draw "CLEAR" icons on unlocked scenarios, but there aren't proper icon position data for that, so if you manage to beat at least one of them, the scenarios select screen will glitch, if you beat both, game will hang. This is not really important at all, because you just can't beat any of extra scenarios. Also there is an copy-paste error mistakenly put a wrong variable as a counter, this isn't break anything but does an extra redundant cycles. 146 | BUGS#6.FIXED(BFS) The briefing messages has a couple of spelling errors and incorrect spacing comparing to the original Micropolis messages where they were taken from. 147 | BUGS#7.FIXED(BFS) There is non-critical bug in present items free slot search routine. In case you have no free slots, it will run for 256 redundant extra cycles. This does not break anything though anyway except stolen CPU cycles. 148 | BUGS#8.FIXED(GG KIEXNPVU+OLOZEPUX) The City scan routine uses a copy of power map data fetch routine at PRGB:$A8D9 to check if scanned building is powered or not. This fetch routine uses a bitmask array to test individual bits for every building in the power grid map. If bit 0, then building isn't powered and won't grow or drop down growth instantly. If bit is 1, then all developments are enabled. The problem is opcode to read bitmask data at PRGB:$A90E (AND $A3B6,X) refers to the bitmask table in PRGA, but in PRGB it refers to the portion of the game's code. Seems they overlooked this when moving the code around. As a result, this function may returning non zero values because more than one bit are unmasked then. If you have some powered areas nearby or just not-connected electrics, then not powered building may develop and grow even with no power icon blinking on it. 149 | BUGS#9.FIXED(GG EPXXYZNP) Sound is cracking sometimes in two channels. There is a reasonable solution for square channel by now, thanks to Chris Covell. 150 | BUGS#10.FIXED(GG KEEAGEVE) When airplane crashes, it's damaging one particular tile on the map with enabling "GOTO" alert button. However, due to copy-paste bug, the coordinates of "GOTO" are wrong and not points to the crash site. 151 | BUGS#11.TODO Pollution area zone calculated as a sum of weights of the tiles for every 4x4 map area. Weights are follow: developer I area +2 for a tile (+8 for 2x2 building), coal power station/sea-air ports/fires +3 for a tile (+36 for 3x3 building), and flooded ground +15 for a tile, the rest gives 0. The flooded ground has index B5, the nuclear waste pollution have index B6, so the seems mistakenly swapped them. The Micropolis source uses exactly nuclear waste for this calculation as max pollution source. 152 | BUGS#12. Tere is a var $67D, which never written by any code, but read sometimes and used in calcs. 153 | BUGS#12.1.FIXED(BFS) It is used as "Fires" parameter of City problems list calculations (param = {_fires_count * 5}). The NES version does not count the Fire tiles at all unless the Micropolis original version. 154 | BUGS#12.2.FIXED(GG KENXEOIY) Also it summed with police stations counter in a city assessed value calculations. Based on Micropolis source code, police stations counter summed with fire stations counter. 155 | BUGS#13.FIXED(BFS) The game var init routine clears only the lower nibble of _city_assessed_value not touching the high ones and then immediately clears the _annual_score_change var which is a temporary var resided near the _city_assessed_value ram address. There is unknown if they wether missed two more bytes to be cleared or clear a wrong vars instead. 156 | BUGS#14.FIXED(BFS) City assessed value recalc routine have a major calc mistake: 6 out of 9 parameters has wrong weight multipliers, basically they swapped hi and low nibbles of the 16-bit constants. So instead of weight for hospitals $0190 (decimal 400) we have $9001 (decimal 36865) and so on. 157 | BUGS#15.FIXED(GG PAXUVIAT) Monster disaster appearance logic choses randomly the appearance point inside the map, calculates the destination point based on what side of the map is farthest then select a random position on that side. The selection routine stores both X and Y destination coordinates in the same variable. The most noticeable result of this bug is that the first appearance with higher probability the monster will go up on the map. 158 | BUGS#16.FIXED(BFS) Graphs screen data ranges button selector (10/100 years) default state is 10 and should be displayed as pushed button. However, it not pressed at all by default. Only way to display it properly is to push 100 years button then push 10 again. 159 | BUGS#17.TODO There are several scenario maps with some defects, usually they have one or two power lines not connected properly, so some buildings are not powered at start. 160 | BUGS#18.TODO Sometimes, at the beginning of the Practice mode, when game message window appears at the same time as scroller message on the screen, the R left at the left-top corner. 161 | BUGS#19.FIXED(BFS) Game cursor not disabled when the game event message appears after you enter the Info screens at least once. If triggered, you'll see a garbled cursor near the menu button every time the event message change the page or accept input. 162 | BUGS#20.FIXED(BFS) Difficult settings does not work for New City mode. Although it can be selected, it will reset again at the beginning of a new game, so in any cases you'll play on EASY by default. 163 | BUGS#21.FIXED(BFS) When you build a present, a corresponding item removed from the list and then list is recompressed to remove the holes. However, the current present menu slot index does not changes. If you selected very first present to build, there is no problem. But when you select the last one and does not select another slot manually, you'll build a garbled construction which you couldn't remove or bulldoze. 164 | BUGS#22.TODO Some electric tiles at the shores does not displayed as connected on the Power Grid map screen. 165 | BUGS#23. Graphs calculations slightly broken and mangled, mostly due to copy-pasting. 166 | BUGS#23.1.FIXED(BFS) For R it should multiply level value by 2, but instead multiplied integer part of value with itself. The R levels usually are in range 1 to 2, so most of the time we have roughly rounded integer value as a result in case of this bug. 167 | BUGS#23.2.FIXED(BFS) For "Pollution" button they uses crime level value instead. 168 | BUGS#23.3.FIXED(BFS) For "Cash Flow" button they uses highest nibble of money which means only money above 65535 will be documented and used. Also they do the same highest bit masking as for special flags in crime and pollution levels values, which never used for money, so this is definitely a copy-paste too. The Micropolis code uses Tax Income value here instead. 169 | BUGS#23.4.FIXED(BFS) For "Crime" button they uses Tax Income mentioned above. It may be positive or negative. They attempted to shift the graph up to be able to display signed values (middle is zero, up - positive, down - negative), but never attempted to determine if there is a positive or negative value they calculating. 170 | BUGS#24.FIXED(BFS) City problems list calculation routines has also at least one more major mistake that gets semi-random results on the overall calc in addition to BUGS#12.1. One of the problems (unemployment) uses RCI proportion as a test value: param={L_R/(L_C+L_I)*8} also clamped to FRAC portion (0.999). However, calc routine stores divider in wrong temporary variable. Must be $EA-$EB, but gets to $E7-$E8 instead. (INES PATCH: $14C43: EA, $14C4B: EA, $14C4E: EA, $14C51: EA, $14C54: EB, $14C56: EA) 171 | BUGS#24.1.FIXED(BFS) Clamping RCI proportion to 0.999 also wrong. Using this equation we must calc how much times residental zones development level higher than C+I levels combined, means how much unemployed people there are. When unemployment is high, INT portion of result should be non-zero. But this value equals 1 when both levers are equal, means the best case. But code there still truncates it to 0.999 and treat as a bad case. Micropolis source subtract 1.00 from result of proportion and then truncate to 0.999 to have correct values. 172 | BUGS#24.2.FIXED(BFS) The problem sorting routine looks kinda wrong as well. It skips problem with the same amount of percents and takes only the last one of them, also for many cases it takes not the greatest ones. As a result, we see not the actual worst problems list, but semi-random list of high values with lowest ones. 173 | BUGS#25. City score calculations are broken too. The main problem here is because BUG#26 actually, but may be adjusted for this particular calculations and so the values may be much more reliable. 174 | BUGS#25.1.FIXED(BFS) The problems list summing at the start of the calc routine does calculation on 8-bit values! But the values are 16-bit. So we skip half of problems list as well as INTEGER parts of high problem values are added as a FRAC parts so result is much lower than should be! However, in conjunction with BUGS#25.2 this does make results looks better! The first bug is balancing the second one occasionally. 175 | BUGS#25.2.FIXED(BFS) The base value of the score is inverted sum of problems multiplied by 4 and truncated to 1000. The max value of sum of problems is FF so this should give a minimum base scores, and so on. The less sum value (except case with 0, rarely possible) more base scores. But, after multiply this value by 4 the code does not save lower nibble of the result. Instead it takes the previously used sum value which is still not inverted. So when you have high nibble of result (~700) and a lower nibble of small sum the result will be less than proper one and vice versa. When you have a lot of problems, you will have additional points higher than they may be. 176 | BUGS#25.3.FIXED(BFS) The transport funding value maximum is 33, but must be 32 instead. There is a comparison during the city scores calculation which need this value be 32 exactly and do wrong calc if it is 33. So you will get worse scores even if you have 100% funding. 177 | BUGS#25.4.FIXED(BFS) RCI growth levels (RCI meters to the bottom-left) never lowers the score. They must do that when negative. But tests are incorrect and never passed. 178 | BUGS#25.5.FIXED(BFS) Result of score adjustment with net migration proportion stored in wrong value, so the actual result is never used, instead used one of the multiplication arguments (exactly the proportion value). 179 | BUGS#26.FIXED(BFS) Overal calculations of average values mostly broken. However, somehow they compensated by BUGS#24, BUGS#25, or were rebalanced manually in attempt to fix incorrect results of previous calculations. The main problem here the original source has a wide range averages for base values. Pollution average, Crime level average are sums of all area levels divided by number of such areas. The average mathematically can't be greater than max value of the single area. In the NES code, values for all areas are in range from $00 to $0F. So average shouldn't be higher than $0F. However, due to some data formats mangling and misunderstanding, the averages calculated as a result of division of two fixed points values. And even if we may assume that area values in range $00 to $0F are a small fixed point values, we mustn't treat the divider the same. Divider is an integer value. If you treat it as fixed point, where low nibble is FRAC, and high nibble is INT, then you will get anything but average value. For example. Sum of crime area levels is $0653, total areas collected is $00F1. Then if divide as fixed point we divide 6.324 to 0.941 ($00F1=0.241/256). But since we divide to value <1, the result will be HIGHER than overall sum. And then this value is used for all other calculations! So we literally using not the average levels, but weighted sums. Other side effect here is when we have more than 256 areas to calc the average the higher nibble of 16-bit counter won't be zero, so we will have a little scaling down of average values, but still not so much high how it should be. Even if we will calc the max number of areas (38*38=1444) the counter won't be greater than $05A4 or only 5 times smalled if treated as a fixed point number. The only way to beat this problem during the game is to keep all averages as closer to zero as possible. Which is mostly impossible for pollution for example, and even for crime rates low on map the average will be high enough to cause a problems. 180 | BUGS#27.FIXED(BFS) Save/Load option in the game has a special game mode index 0. At the same time you may save and load any mode of the game. When restored, the game mode turns zero and then special scenario or practice events won't appear anymore. So literally you just couldn't continue the game properly unless you've played the new city mode. 181 | BUGS#28.FIXED(BFS) The Fires control routine tries to fire up all tiles near it, however, due to incorrect using of the subroutine which corrupts X register, most of the time fires skip the rest of the nearest tiles as soon as at least one near tile appears to be inside any building. 182 | BUGS#29.FIXED(BFS) The liberty statue and an expo statues are presents which should appear automatically after some years of a trigger event, the relationship and expo correspondingly (see APPEND. A). However, there is a bug in addition routine which prevents the correct values to be stored, so both presents appears immediately after trigger events on the next simulation loop. There is a third event with same condition, it's a Bank. But this time the addition performed manually and in different portion of code so does not affected by this bug. 183 | BUGS#30.TODO At the New City generate screen, push any arrow buttons to change the map number manually, then quick put cursor to the "START NEW GAME" button and try to push it. Instead the map number area will blink. This happens when the map generating started but cursor movements not locked when manual map change used. 184 | BUGS#31.TODO Rate of growth map should display the zero growth as orange color for the whole map and only a patches of growth/degrade areas. After some time map degraded to be completely colorless with just a small patches of growth/degrade areas. 185 | 186 | APPEND. A - EVENTS/PRESENTS 187 | 188 | EVENT REQUIREMENTS RESULTS REPEATS MESSAGE APPEAR 189 | 01 Becomes a Town 2000 population history record once per game yes 190 | 02 Becomes a City 10000 population history record, once per game yes 191 | present "White House" 192 | 03 Becomes a Capital 50000 population history record once per game yes 193 | 04 Becomes a Metropolis 100000 population history record once per game yes 194 | 05 Becomes a Megapolis 500000 population history record once per game yes 195 | 06 Traffic is bumper to bumper traffic level 7 - every recalculation yes 196 | 07 Commuters are grid-locket traffic level 2 - every recalculation yes 197 | 08 Crime rate is much too high crime level 7 - every recalculation yes 198 | 09 Monster disaster scenario specific monster appears, scenario specific yes 199 | destroy all on its path 200 | 0A Eartquake disaster scenario specific ground shake, scenario specific yes 201 | destroy random areas 202 | 0B Bank wants to build office 5 years after White present "Bank" once per game yes 203 | House has built 204 | 0C City wants relationship 150000 population relationship begin once per game yes 205 | 0D Open amusement park 120000 population present "Amusement Park" once per game yes 206 | 0E Open a Zoo 250000 population present "Zoo" once per game yes 207 | 0F Open a Casino 200000 population present "Casino" once per game yes 208 | 10 Build an extra land 2 sea ports present "Extra Land" once per game no, see BUGS#4 209 | 11 New Police Station 10 police stations present "New Police St." once per game yes 210 | 12 New FireStation 10 police stations present "New Fire St." once per game yes 211 | 13 10th anniversary monument practice/city JAN 1910 present "10th Monument" once per game yes 212 | 14 100th anniversary monument practice/city JAN 2000 present "100th Monument" once per game yes 213 | 15 Holding World Expo practice/city JAN 1950 expo starts once per game yes 214 | 16 Erect Expo monument practice/city JAN 1951 present "Expo Monument" once per game yes, see BUGS#29 215 | 17 Statue of Liberty present practice/city 10 years, present "Liberty" once per game yes, see BUGS#29 216 | after City Sistership 217 | 18 Build a Library 70000 population present "Library" once per game no, see BUGS#4 218 | 19 Parks expand 200 park squares present "Extra Park" once per game yes 219 | 1A Railroad Station 150 rail squares present "Railroad St." once per game yes 220 | 1B Practice Intro Practice FEB 1900 - once per game yes 221 | 1C Practice Hint Practice FEB 1901 - once per game yes 222 | 1D Practice mode Failed Practice FEB 1905, - once per game no, see BUGS#3 223 | <30000 population 224 | 1E Practice mode Complete Prectice FEB 1905, - once per game no, see BUGS#3 225 | >=30000 population 226 | 1F Bank Hint Bank has build "BANK" button enabled once per game yes 227 | at Budget screen 228 | 20 Fire disaster manual request burn random areas scenario specific yes 229 | 21 Flood disaster scenario specific flood shore areas scenario specific yes 230 | 22 Airplane Crash random or when PLANE destroy single area scenario specific yes 231 | collide with HELI 232 | 23 Tornado disaster scenario specific destroy all on its path scenario specific yes 233 | 234 | APPEND B. SCROLL MESSAGES 235 | 236 | MESSAGE REQUIREMENTS FORCED NOTES 237 | 00 MORE RESIDENTIAL ZONES NEEDED R<(R+C+I)/4 no - 238 | 01 MORE COMMERCIAL ZONES NEEDED C<(R+C+I)/8 no - 239 | 02 MORE INDUSTRIAL ZONES NEEDED I<(R+C+I)/8 no - 240 | 03 MORE ROADS REQUIRED (R+C+I)>=10, (R+C+I)>ROADS no - 241 | 04 INADEQUATE RAIL SYSTEM (R+C+I)>=50, (R+C+I)>RAILS no - 242 | 05 BUILD A POWER PLANT (R+C+I)>=10, POWER=0 no see BUGS#1 243 | 06 RESIDENTS DEMAND A STADIUM R_L>=500fp, STADIUM=0 yes - 244 | 07 INDUSTRY REQUIRES A SEA PORT I_L>=100fp, SEAPORT=0 yes - 245 | 08 COMMERCE REQUIRES AN AIRPORT C_L>=150fp, AIRPORT=0 yes - 246 | 09 CITIZENS DEMAND A FIRE DEPARTMENT ALL_L>=60fp, SPOLICE=0 no ALL_L=(R_L+C_L+I_L) 247 | 0A CITIZENS DEMAND A POLICE DEPARTMENT ALL_L>=60fp, SFIRE=0 no ALL_L=(R_L+C_L+I_L) 248 | 0B BLACKOUTS REPORTED CHECK POWER MAP -unused- - see UNFINISHED#4.1 249 | 0C CITIZENS UPSET THE TAX RATE IS TOO HIGH TAX_RATE>=0C no - 250 | 0D ROADS DETERIORATING DUE TO LACK OF FUNDS RFUND_RATE<18, ROADS>=30 no - 251 | 0E FIRE DEPARTMENTS NEED FUNDING FFUND_RATE<0B, ALL_L>=20fp no ALL_L=(R_L+C_L+I_L) 252 | 0F POLICE DEPARTMENTS NEED FUNDING PFUND_RATE<0B, ALL_L>=20fp no ALL_L=(R_L+C_L+I_L) 253 | 10 A PLANE HAS CRASHED -unused- - used as EVENT MESSAGE #22 254 | 11 SHIPWRECK REPORTED -unused- - see UNFINISHED#4.3 255 | 12 A TRAIN CRASHED -unused- - see UNFINISHED#4.3 256 | 13 A HELICOPTER CRASHED -unused- - see UNFINISHED#4.3 257 | 14 UNEMPLOYMENT RATE IS HIGH -unused- - see UNFINISHED#4.4 258 | 15 YOUR CITY HAS GONE BROKE -unused- - see UNFINISHED#4.5 259 | 16 EXPLOSION DETECTED -unused- - see UNFINISHED#4.6 260 | 17 BROWNOUTS BUILD ANOTHER POWER PLANT -unused- - see UNFINISHED#4.7 261 | 18 HEAVY TRAFFIC REPORTED TRAFFIC>=10 under HELI pos yes see MISC#1 262 | 263 | APPEND C. MAP TILE INDEXES 264 | 265 | BUILDING FLAGS FLAG BITS 266 | 00-18 regular R area CA 11001010 267 | 19 hospital CA 11001010 268 | 1A school CA 11001010 269 | 1B-1F - - - 270 | 20-38 C area CA 11001010 271 | 39-3F - - - 272 | 40-48 I area CA 11001010 273 | 49-4F - - - 274 | 50 police station CA 11001010 275 | 51 fire station CA 11001010 276 | 52-5F - - - 277 | 60 coal power station CA 11001010 278 | 61 nuclear power station CA 11001010 279 | 62 sea port CA 11001010 280 | 63 stadium CA 11001010 281 | 64 air port CA 11001010 282 | 65-6F - - - 283 | 70 bank CE 11001110 284 | 71 amusement park CE 11001110 285 | 72 zoo CE 11001110 286 | 73 casino CE 11001110 287 | 74 reclaimed water ground CE 11001110 *turns to 90 when used 288 | 75 new police station CE 11001110 289 | 76 new fire station CE 11001110 290 | 77 10th monument CE 11001110 291 | 78 100th monument CE 11001110 292 | 79 expo monument CE 11001110 293 | 7A liberty monument CE 11001110 294 | 7B library CE 11001110 295 | 7C park CE 11001110 296 | 7D train station CE 11001110 297 | 7E white house CE 11001110 298 | 7F - - - 299 | 80-8E internal building's tiles C0 11000000 300 | 8F - - - 301 | 90 bulldozed ground 02 00000010 302 | 91-9B road 62 01100010 303 | 9C-A6 rail 52 01010010 304 | A7-B1 electric C2 11000010 305 | B2 park grass 46 01000110 306 | B3 park tree 06 00000110 307 | B4 corrupt ground 02 00000010 308 | B5 flooded ground 00 00000000 309 | B6 polluted ground 00 00000000 310 | B7-B8 road+rail 52 01010010 311 | B9-BA electric+road E2 11100010 312 | BB-BC electric+rail D2 11010010 313 | BD water 05 00000101 314 | BE-CD ground/water shores 06 00000110 315 | CE-DF unbulldozed ground 46 01000110 316 | E0-E1 water+road 05 00000101 317 | E2-E3 water+rail 15 00010101 318 | E4-E5 water+electric 85 10000101 319 | E6 fire ground 00 00000000 320 | E7-EA disaster ground anim 00 00000000 321 | EB-EC sailable water+road 05 00000101 322 | ED-FC open bridge road 05 00000101 *unused* 323 | FD - - - 324 | FE sailable water tile 05 00000101 325 | FF - - - 326 | 327 | APPEND D. FLAG BITS DESCRIPTION 328 | 329 | 7bit (80) - conductor tile 330 | 6bit (40) - flammable tile 331 | 5bit (20) - road tile 332 | 4bit (10) - rail tile 333 | 3bit (08) - building tile 334 | 2bit (04) - terrain tile 335 | 1bit (02) - floodable tile 336 | 0bit (01) - water tile 337 | 338 | BFS CHANGES LIST 339 | 340 | - Removed garbage and commented out all unreferenced data and code for further possible usage, if any. 341 | - Cleanup some portions of the code, minor optimizations on size. 342 | - Macrofication of the code for much more readable listing. 343 | - Commented as much as possible code and data which i clearly understand what it does and sometimes some thoughts about how those people wrote this program. 344 | - Optimized redundant or duplicated code chunks, similar routines merged and used as common system routines. Overall reducing of the code more than 4Kb without any changes to the game's logic (except maybe timings and sometimes RNG as a result of this). 345 | - Better screen refresh while ppu data dequeue process (see MISC#17), now has less visible garbage and cause less wrong CHR data logging. However, still not ideal. 346 | - While fixing BUG#27 by rearranging the RAM variables which also need to be saved with the City map and data, also rearranged the Difficult setting variable which properly fixed BUGS#20 too, also the configuration window positions saved with the city as well. 347 | - Fixed issue in MISC#14 section, now drive from C to C areas are forbidden. 348 | - Swapped the correct values for corresponding buttons in Graphs screen, also Tax Income value used instead of Money higher nibbles for "Cash Flow" button. 349 | - Rescaled and rebalanced some values after fixing some calculation bugs. This may also change the overall game mechanics and difficulty. 350 | - "FREEDOM" scenario treated as a Practice mode with Freedom map and speed setting SLOW. 351 | So this is restored and fixed the original bug at the same time. 352 | - Attributes of the pressed buttons on the Name entry screens are now not inverted while pressed. However, they may invert it on purpose but this looks odd actually. The evidence it may be done on purpose that non-sprite push button ("CL") animation uses attr switch the same way as sprites does. 353 | - Restored sound effect (UNFINISHED#3) can be heard when var $00F1 write value $80. Still have no idea where it should be used. 354 | - Restored ship object (UNFINISHED#5) uses the existing movement logic with some corrections to be more like in the SNES version, and a totally new deploy code made by guess. 355 | - Restored water road drive ability (UNFINISHED#22) using additional unused tiles (UNFINISHED#10) also rewritten fetch routine to allow more tiles to be accessible. 356 | - Restored part of Present building descriptions for HUD display (UNFINISHED#10). Missing entries uses either common "BUild Monument" or "BuildPresent" strings. 357 | - Money can't drop down to zero now even with loan. If money are negative after the budget calcs, the "CITY GOME BROKE" message is displayed once after the end of the year or every time you exit the budget screen. Total city amount stay at 0 even if budget currently show negative balance. 358 | 359 | BFS TODO 360 | 361 | - PRG1 _rle_nt_res_queue, _rle_extnt_res_queue routines are similar, merge. 362 | - Graphs data interpolations for all values. 363 | - Graphs data scale based on previously unused values. 364 | - Convert all _mmc5_mul8to8 calls to MULAI calls, should be faster. 365 | - Finish mini-map re and rename. 366 | - Finish events animation code re and rename. 367 | - Fixing BUGS#24, BUGS#25, BUGS#26 revealed the other problem. The trigger values for events and tests now has to be recalibrated too. 368 | - There are some other special variables left unsaved for BUGS#27 when scenario is triggered. No object or internal counters of current disaster aren't stored. Sometimes with this you may "skip" disaster. 369 | - Probably better way to signal about city gone broke, maybe constantly. In this case reimplement gone broke flag clear. 370 | - Three parts of the game uses three different versions of the same routines to read/write, test and combine nearest tiles. Some of them are optimized, some very unoptimal, some uses it's own data arrays duplicated the ones common used in other places. 371 | - Adjust amount of taxes collected, seems balance here is broken now. 372 | 373 | BFS BUGS 374 | 375 | - Ship object goes completely invisible when stuck on the edge of the map or in the ponds. 376 | - During the New City mode game (or other maybe), sometimes an unknown object is floating around the screen with garbled sprites. Looks like there is a tornado obj handler broken somehow. 377 | --------------------------------------------------------------------------------