8

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?

4
  • Now I'm aware this is not specific to Amiga ROMs. If it fits more categories you're familiar with please amend tags Commented Jun 4, 2021 at 12:52
  • 2
    Somehow this seems rather broad. After all, byte swap is, much like split, an unspecific term used in different situations for different reason. Widening it further up doesn't help. Instead it may be a good idea to narrow it down to an explicit usage you encountered this expression - best case with one or more examples included/liked showing context and wording.
    – Raffzahn
    Commented Jun 4, 2021 at 13:26
  • 1
    Byte swapping in general normally means reversing the order of the 2 bytes within each aligned pair. i.e. convert all the 2-byte words between big/little endian. i.e. 16-bit rotate-by-8 on every 16-bit chunk. Or endian-reverse within 4-byte chunks, if that's appropriate for the target machine. Commented Jun 4, 2021 at 20:55
  • 2
    Does retrocomputing.stackexchange.com/questions/16131/… help? I found it by putting what is byte swapping a rom into a search engine. What happened when you tried that? Commented Jun 5, 2021 at 3:30

2 Answers 2

14

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.

3
  • 2
    This 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 H
    Commented 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
  • 2
    The 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 H
    Commented Jun 4, 2021 at 14:07
8

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:

  1. 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.)

  2. 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]).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .