|
| 1 | +MEMORY { |
| 2 | +#RAM Addresses: |
| 3 | + # Zero page |
| 4 | + ZP: start = $00, size = $100, type = rw, define = yes, file = ""; |
| 5 | + |
| 6 | + RAM: start = $0320, size = $03E0, define = yes, file = ""; |
| 7 | + C_STACK: start = $0300, size = $0020, define = yes, file = ""; |
| 8 | + OAM_BUF: start = $0200, size = $0100, define = yes, file = ""; |
| 9 | + PAL_BUF: start = $0180, size = $0040, define = yes, file = ""; |
| 10 | + VRAM_BUF: start = $0700, size = $0100, define = yes, file = ""; |
| 11 | + |
| 12 | + WRAM: start = $6000, size = $2000, define = yes, file = ""; |
| 13 | + |
| 14 | +#INES Header: |
| 15 | + HEADER: start = $0, size = $10, file = %O ,fill = yes; |
| 16 | + |
| 17 | + |
| 18 | +#ROM Addresses: |
| 19 | + ROM_M_00: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $00; |
| 20 | + ROM_M_01: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $01; |
| 21 | + ROM_M_02: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $02; |
| 22 | + ROM_M_03: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $03; |
| 23 | + ROM_M_04: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $04; |
| 24 | + ROM_M_05: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $05; |
| 25 | + ROM_M_06: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $06; |
| 26 | + ROM_M_07: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $07; |
| 27 | + ROM_M_08: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $08; |
| 28 | + ROM_M_09: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $09; |
| 29 | + ROM_M_0A: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $0A; |
| 30 | + ROM_M_0B: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $0B; |
| 31 | + ROM_M_0C: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $0C; |
| 32 | + ROM_M_0D: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $0D; |
| 33 | + ROM_M_0E: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $0E; |
| 34 | + ROM_M_0F: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $0F; |
| 35 | + ROM_M_10: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $10; |
| 36 | + ROM_M_11: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $11; |
| 37 | + ROM_M_12: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $12; |
| 38 | + ROM_M_13: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $13; |
| 39 | + ROM_M_14: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $14; |
| 40 | + ROM_M_15: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $15; |
| 41 | + ROM_M_16: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $16; |
| 42 | + ROM_M_17: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $17; |
| 43 | + ROM_M_18: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $18; |
| 44 | + ROM_M_19: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $19; |
| 45 | + ROM_M_1A: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $1A; |
| 46 | + ROM_M_1B: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $1B; |
| 47 | + ROM_M_1C: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $1C; |
| 48 | + ROM_M_1D: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $1D; |
| 49 | + ROM_M_1E: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $1E; |
| 50 | + ROM_M_1F: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $1F; |
| 51 | + ROM_M_20: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $20; |
| 52 | + ROM_M_21: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $21; |
| 53 | + ROM_M_22: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $22; |
| 54 | + ROM_M_23: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $23; |
| 55 | + ROM_M_24: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $24; |
| 56 | + ROM_M_25: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $25; |
| 57 | + ROM_M_26: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $26; |
| 58 | + ROM_M_27: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $27; |
| 59 | + ROM_M_28: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $28; |
| 60 | + ROM_M_29: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $29; |
| 61 | + ROM_M_2A: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $2A; |
| 62 | + ROM_M_2B: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $2B; |
| 63 | + ROM_M_2C: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $2C; |
| 64 | + ROM_M_2D: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $2D; |
| 65 | + ROM_M_2E: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $2E; |
| 66 | + ROM_M_2F: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $2F; |
| 67 | + ROM_M_30: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $30; |
| 68 | + ROM_M_31: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $31; |
| 69 | + ROM_M_32: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $32; |
| 70 | + ROM_M_33: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $33; |
| 71 | + ROM_M_34: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $34; |
| 72 | + ROM_M_35: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $35; |
| 73 | + ROM_M_36: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $36; |
| 74 | + ROM_M_37: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $37; |
| 75 | + ROM_M_38: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $38; |
| 76 | + ROM_M_39: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $39; |
| 77 | + ROM_M_3A: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $3A; |
| 78 | + ROM_M_3B: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $3B; |
| 79 | + ROM_M_3C: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $3C; |
| 80 | + ROM_M_3D: start = $a000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $3D; |
| 81 | + # MMC3 uses exclusively 8kb banks, so we have to break up the 16kb of fixed storage, too. |
| 82 | + PRG: start = $8000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes, bank = $00; |
| 83 | + PRG_2: start = $e000, size = $2000, type = ro, file = %O, fill = yes, fillval = $00, define = yes; |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | +#64 Banks of 8K CHR ROM |
| 88 | + GAMECHR: start = $0000, size = $1c000, file = %O, fill = yes; |
| 89 | + PARALLAXCHR: start = $0000, size = $24000, file = %O, fill = yes, bank = $70; |
| 90 | +} |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | +SEGMENTS { |
| 96 | + HEADER: load = HEADER, type = ro, define = yes; |
| 97 | + COLLMAP0: load = WRAM, type = bss, start = $6000, define = yes; |
| 98 | + WRAM_SL0: load = WRAM, type = bss, start = $60F0, define = yes, optional = yes; |
| 99 | + COLLMAP1: load = WRAM, type = bss, start = $6100, define = yes; |
| 100 | + WRAM_SL1: load = WRAM, type = bss, start = $61F0, define = yes, optional = yes; |
| 101 | + COLLMAP2: load = WRAM, type = bss, start = $6200, define = yes; |
| 102 | + WRAM_SL2: load = WRAM, type = bss, start = $62F0, define = yes, optional = yes; |
| 103 | + COLLMAP3: load = WRAM, type = bss, start = $6300, define = yes; |
| 104 | + WRAM_SL3: load = WRAM, type = bss, start = $63F0, define = yes, optional = yes; |
| 105 | + SRAM: load = WRAM, type = rw, align = $0100, define = yes; |
| 106 | + IRQ_T: load = WRAM, type = bss, start = $7FC0, define = yes; |
| 107 | + # Banks for mmc3 are split into two groups: |
| 108 | + # A: The first 8kb section in memory |
| 109 | + # B: The second 8kb section in memory. |
| 110 | + # You can only put banks from section A into the first memory bank, and banks from section B into the second. |
| 111 | + DAT_BANK_00: load = ROM_M_00, type = ro, optional = yes; |
| 112 | + DAT_BANK_01: load = ROM_M_01, type = ro, optional = yes; |
| 113 | + DAT_BANK_02: load = ROM_M_02, type = ro, optional = yes; |
| 114 | + DAT_BANK_03: load = ROM_M_03, type = ro, optional = yes; |
| 115 | + DAT_BANK_04: load = ROM_M_04, type = ro, optional = yes; |
| 116 | + DAT_BANK_05: load = ROM_M_05, type = ro, optional = yes; |
| 117 | + DAT_BANK_06: load = ROM_M_06, type = ro, optional = yes; |
| 118 | + DAT_BANK_07: load = ROM_M_07, type = ro, optional = yes; |
| 119 | + DAT_BANK_08: load = ROM_M_08, type = ro, optional = yes; |
| 120 | + DAT_BANK_09: load = ROM_M_09, type = ro, optional = yes; |
| 121 | + DAT_BANK_0A: load = ROM_M_0A, type = ro, optional = yes; |
| 122 | + DAT_BANK_0B: load = ROM_M_0B, type = ro, optional = yes; |
| 123 | + DAT_BANK_0C: load = ROM_M_0C, type = ro, optional = yes; |
| 124 | + DAT_BANK_0D: load = ROM_M_0D, type = ro, optional = yes; |
| 125 | + DAT_BANK_0E: load = ROM_M_0E, type = ro, optional = yes; |
| 126 | + DAT_BANK_0F: load = ROM_M_0F, type = ro, optional = yes; |
| 127 | + DAT_BANK_10: load = ROM_M_10, type = ro, optional = yes; |
| 128 | + DAT_BANK_11: load = ROM_M_11, type = ro, optional = yes; |
| 129 | + DAT_BANK_12: load = ROM_M_12, type = ro, optional = yes; |
| 130 | + DAT_BANK_13: load = ROM_M_13, type = ro, optional = yes; |
| 131 | + DAT_BANK_14: load = ROM_M_14, type = ro, optional = yes; |
| 132 | + DAT_BANK_15: load = ROM_M_15, type = ro, optional = yes; |
| 133 | + DAT_BANK_16: load = ROM_M_16, type = ro, optional = yes; |
| 134 | + DAT_BANK_17: load = ROM_M_17, type = ro, optional = yes; |
| 135 | + DAT_BANK_18: load = ROM_M_18, type = ro, optional = yes; |
| 136 | + DAT_BANK_19: load = ROM_M_19, type = ro, optional = yes; |
| 137 | + DAT_BANK_1A: load = ROM_M_1A, type = ro, optional = yes; |
| 138 | + DAT_BANK_1B: load = ROM_M_1B, type = ro, optional = yes; |
| 139 | + DAT_BANK_1C: load = ROM_M_1C, type = ro, optional = yes; |
| 140 | + DAT_BANK_1D: load = ROM_M_1D, type = ro, optional = yes; |
| 141 | + DAT_BANK_1E: load = ROM_M_1E, type = ro, optional = yes; |
| 142 | + DAT_BANK_1F: load = ROM_M_1F, type = ro, optional = yes; |
| 143 | + DAT_BANK_20: load = ROM_M_20, type = ro, optional = yes; |
| 144 | + DAT_BANK_21: load = ROM_M_21, type = ro, optional = yes; |
| 145 | + DAT_BANK_22: load = ROM_M_22, type = ro, optional = yes; |
| 146 | + DAT_BANK_23: load = ROM_M_23, type = ro, optional = yes; |
| 147 | + DAT_BANK_24: load = ROM_M_24, type = ro, optional = yes; |
| 148 | + DAT_BANK_25: load = ROM_M_25, type = ro, optional = yes; |
| 149 | + DAT_BANK_26: load = ROM_M_26, type = ro, optional = yes; |
| 150 | + DAT_BANK_27: load = ROM_M_27, type = ro, optional = yes; |
| 151 | + DAT_BANK_28: load = ROM_M_28, type = ro, optional = yes; |
| 152 | + DAT_BANK_29: load = ROM_M_29, type = ro, optional = yes; |
| 153 | + DAT_BANK_2A: load = ROM_M_2A, type = ro, optional = yes; |
| 154 | + DAT_BANK_2B: load = ROM_M_2B, type = ro, optional = yes; |
| 155 | + DAT_BANK_2C: load = ROM_M_2C, type = ro, optional = yes; |
| 156 | + DAT_BANK_2D: load = ROM_M_2D, type = ro, optional = yes; |
| 157 | + DAT_BANK_2E: load = ROM_M_2E, type = ro, optional = yes; |
| 158 | + DAT_BANK_2F: load = ROM_M_2F, type = ro, optional = yes; |
| 159 | + DAT_BANK_30: load = ROM_M_30, type = ro, optional = yes; |
| 160 | + DAT_BANK_31: load = ROM_M_31, type = ro, optional = yes; |
| 161 | + DAT_BANK_32: load = ROM_M_32, type = ro, optional = yes; |
| 162 | + DAT_BANK_33: load = ROM_M_33, type = ro, optional = yes; |
| 163 | + DAT_BANK_34: load = ROM_M_34, type = ro, optional = yes; |
| 164 | + DAT_BANK_35: load = ROM_M_35, type = ro, optional = yes; |
| 165 | + DAT_BANK_36: load = ROM_M_36, type = ro, optional = yes; |
| 166 | + |
| 167 | + SFX_BANK: load = ROM_M_37, type = ro, optional = yes; |
| 168 | + |
| 169 | + PCM_BANK_B: load = ROM_M_38, type = ro, optional = yes; |
| 170 | + PCM_BANK: load = ROM_M_39, type = ro, optional = yes; |
| 171 | + |
| 172 | + XCD_BANK_06: load = ROM_M_3A, type = ro, optional = yes; |
| 173 | + XCD_BANK_05: load = ROM_M_3B, type = ro, optional = yes; |
| 174 | + XCD_BANK_04: load = ROM_M_3C, type = ro, optional = yes; |
| 175 | + XCD_BANK_03: load = ROM_M_3D, type = ro, optional = yes; |
| 176 | + |
| 177 | + # Fixed banks |
| 178 | + TVDETECT: load = PRG, type = ro, define = yes, optional = yes, align = $20; |
| 179 | + CODE: load = PRG, type = ro, define = yes, optional = yes; |
| 180 | + RODATA: load = PRG, type = ro, define = yes, optional = yes; |
| 181 | + DATA: load = ROM_M_29, run = RAM, type = rw, define = yes, optional = yes; |
| 182 | + OAMALIGN: load = PRG_2, type = ro, define = yes, start = $e000; |
| 183 | + STARTUP: load = PRG_2, type = ro, define = yes; |
| 184 | + NESLIB: load = PRG_2, type = ro, define = yes; |
| 185 | + NESDOUG: load = PRG_2, type = ro, define = yes; |
| 186 | + SND_DRV: load = PRG_2, type = ro, define = yes; |
| 187 | + CODE_2: load = PRG_2, type = ro, define = yes, optional = yes; |
| 188 | + RODATA_2: load = PRG_2, type = ro, define = yes, optional = yes; |
| 189 | + VECTORS: load = PRG_2, start = $fffa, type = ro; |
| 190 | + |
| 191 | + GAMECHR: load = GAMECHR, type = ro; |
| 192 | + PARALLAXCHR: load = PARALLAXCHR, type = ro; |
| 193 | + |
| 194 | + BSS: load = RAM, type = bss, define = yes; |
| 195 | + ZEROPAGE: load = ZP, type = zp; |
| 196 | + |
| 197 | +} |
| 198 | + |
| 199 | + |
| 200 | + |
| 201 | + |
| 202 | +#removed CONDES features |
| 203 | + |
| 204 | + |
| 205 | + |
| 206 | + |
| 207 | +SYMBOLS { |
| 208 | + MAPPER: type = weak, value = 4; # 4 = MMC3 |
| 209 | + SUBMAPPER: type = weak, value = 0; # Standard |
| 210 | + MIRRORING: type = weak, value = 8; # 0, 1 = doesn't matter (its an MMC3 register), 8 = hardwired 4-screen |
| 211 | + PRG_BANK_COUNT: type = weak, value = 32; # 16k PRG chunk count |
| 212 | + CHR_BANK_COUNT: type = weak, value = 32; # 8k CHR chunk count |
| 213 | + SRAM: type = weak, value = 1; # 1 = battery backed SRAM at $6000-7FFF |
| 214 | + TRAINER: type = weak, value = 0; # unneeded |
| 215 | + CONSOLE_TYPE: type = weak, value = 0; # Standard NES/Famicom |
| 216 | + PRG_RAM_COUNT: type = weak, value = 0; # None (it's all non-volatile) |
| 217 | + PRG_NVRAM_COUNT:type = weak, value = 7; # 64 << 7 = 8K |
| 218 | + CHR_RAM_COUNT: type = weak, value = 0; # None |
| 219 | + CHR_NVRAM_COUNT:type = weak, value = 0; # |
| 220 | + CPU_PPU_TIMING: type = weak, value = 2; # Multiregion |
| 221 | + HARDWARE_TYPE: type = weak, value = 0; # Unused |
| 222 | + MISC_ROMS: type = weak, value = 0; # No misc ROMs |
| 223 | + DEF_EXP_DEVICE: type = weak, value = 0; # Unspecified |
| 224 | + |
| 225 | + __DATA_LOAD_BANK__: type = export, value = $29; |
| 226 | +} |
| 227 | + |
0 commit comments