I'd like to understand: What does it mean to "byte swap" when burning kickstart or extended ROMs? Is it the same as "splitting" the ROM? How is it done and why?
2 Answers
Splitting the ROM is not the same as byte-swapping the ROM.
Amiga ROMs are usually split so that odd locations and even locations are stored in separate chips. This is because the 68000 has a 16-bit databus (i.e., it can fetch data 16 bits at a time), and the ROMs are normally 8 bits wide. The solution is to use two ROMs, so that one can contain the even locations, and the other one can contain the odd locations.
The 68000 has byte-select signals that select which of the two bytes get fetched. In this way, during one memory access, either an even byte or an odd byte, or both bytes get fetched.
-
2This answer is basically correct, but could be confusing, since 68000 Amigas have a single 16-bit Kickstart ROM. It's the 32-bit Amigas where two ROMs come into play.– Brian HCommented Jun 4, 2021 at 12:35
-
@BrianH Are you sure about that? I seem to remember the A500 has several chips marked "odd" and "even", but it's a 16-bitter. Commented Jun 4, 2021 at 13:14
-
2The A1000 had two 8-bit ROM chips for its booter. A500/A2000 use a single Kickstart ROM chip. A3000 introduced 32-bit Kickstart ROM using 2 chips. You may be thinking of the Atari ST, with its 6 32Kx8 TOS ROMs.– Brian HCommented Jun 4, 2021 at 14:07
I'm not familiar with Amiga specifically, but, in the general case as you'd see with something like tools for manipulating ROMs of console cartridges:
The system being dumped will typically return more than 8 bits at a time. (The 16-bit data bus OmarL mentioned), which means that the resulting values can be stored in little-endian or big-endian format.
(For Nintendo 64 ROMs, the ROM images are processed in 32-bit increments and ROM formats were originally codified by esoteric dumping hardware, so, when I wrote a swapping utility, in addition to byte-swapping, I also had to offer a "word-swapping" option that can be used on its own or with the byte-swapping option so each 32-bit subsequence can be ordered 1234, 4321, 3412, or 2143.)
There are various kinds of splitting that can be referred to, depending on the ecosystem. For example, the MAME emulator has a file for each ROM chip, while most emulators use formats that combine all the ROMs in a cartridge into a single file (eg. the iNES ROM format concatenates the PRG and CHR ROMs together). Likewise, because ROM chips are often wired up in parallel to efficiently feed a wide data bus (sort of like striped RAID), a ROM format may contain the data in either the format it's read out (a1 b1 a2 b2 a3 b3) or the format it's stored on the chips (a[1 2 3] b[1 2 3]).
what is byte swapping a rom
into a search engine. What happened when you tried that?