wswan:guide:elf_quirks
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
wswan:guide:elf_quirks [2024/09/22 09:34] – asie | wswan:guide:elf_quirks [2024/09/22 11:58] (current) – asie | ||
---|---|---|---|
Line 4: | Line 4: | ||
In general, gcc-ia16 ELF files follow the 32-bit x86 ELF format. | In general, gcc-ia16 ELF files follow the 32-bit x86 ELF format. | ||
+ | |||
+ | ===== Segment relocations ===== | ||
+ | |||
+ | binutils-ia16 introduces a custom set of relocations to support segmentation - the segelf specification as proposed by H. Peter Anvin. In particular, ELFs emitted by Wonderful currently use the following relocations: | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | In addition, '' | ||
+ | |||
+ | More extensive documentation for these relocations is available [[https:// | ||
===== Address space (wswan) ===== | ===== Address space (wswan) ===== | ||
- | ELF addresses '' | + | ELF addresses '' |
< | < | ||
Line 15: | Line 29: | ||
||| |||| |||| |||| |||| |||| |||| |||| | ||| |||| |||| |||| |||| |||| |||| |||| | ||
||| |||| |||| ++++-++++-++++-++++-++++- CPU address (bits 0-19) | ||| |||| |||| ++++-++++-++++-++++-++++- CPU address (bits 0-19) | ||
- | +++-++++-++++-------------------------- ROM bank (bits 30-20) | + | +++-++++-++++-------------------------- |
Corresponds to banks 000 - 7FF (128 MB maximum) | Corresponds to banks 000 - 7FF (128 MB maximum) | ||
The last ROM bank uses addresses FFFxxxxx | The last ROM bank uses addresses FFFxxxxx | ||
</ | </ | ||
+ | |||
+ | To turn this into a physical address in the cartridge ROM's space, you should use the following equation: '' | ||
+ | |||
+ | 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/ | ||
+ | |||
+ | * The ELF address '' | ||
+ | * The ELF address '' | ||
ELF addresses '' | ELF addresses '' | ||
Line 30: | Line 51: | ||
</ | </ | ||
- | ELF addresses '' | + | ELF addresses '' |
- | + | ||
- | ===== Segment relocations ===== | + | |
- | + | ||
- | binutils-ia16 introduces a custom set of relocations to support segmentation - the segelf specification as proposed by H. Peter Anvin. In particular, ELFs emitted by Wonderful currently use the following relocations: | + | |
- | + | ||
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | * '' | + | |
- | + | ||
- | In addition, '' | + | |
- | + | ||
- | More extensive documentation for these relocations is available [[https:// | + | |
===== Address space (wwitch) ===== | ===== Address space (wwitch) ===== |
wswan/guide/elf_quirks.1726997649.txt.gz · Last modified: 2024/09/22 09:34 by asie