User Tools

Site Tools


wswan:guide:elf_quirks

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
wswan:guide:elf_quirks [2024/09/22 10:35] – [Address space (wswan)] asiewswan:guide:elf_quirks [2024/09/22 11:58] (current) asie
Line 34: Line 34:
 </code> </code>
  
-To turn this into a physical address in the cartridge ROM's space, you should use the following equation: ''%%((addr & 0xFFFF) | ((addr & 0x7FF00000) >> 16)) & rom_mask%%''.+To turn this into a physical address in the cartridge ROM's space, you should use the following equation: ''%%((addr & 0xFFFF) | ((addr & 0x7FF00000) >> 4)) & rom_mask%%''.
  
 The high four bits of the CPU address are ignored for physical ROM address transformations. This is because their purpose is to tell the compiler/linker at what address the CPU accesses the 64KB bank, not where it is physically stored on the cartridge. For example: The high four bits of the CPU address are ignored for physical ROM address transformations. This is because their purpose is to tell the compiler/linker at what address the CPU accesses the 64KB bank, not where it is physically stored on the cartridge. For example:
wswan/guide/elf_quirks.1727001330.txt.gz · Last modified: 2024/09/22 10:35 by asie