Welcome, Guest. Please login or register.

Author Topic: ROM format/structure question.  (Read 3012 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: ROM format/structure question.
« on: June 09, 2004, 07:54:17 AM »
IMO it's just some padding to avoid matching anything useful there (like empty space, which it is not).

Curiously, when two of the mathieeesingbas.library V40.4 LVOs were not linked properly, the values in the function offset table were 001A,001C... Almost the same pattern. Not quite though, if it was 001A, 001B I would have considered that pattern some linker padding.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: ROM format/structure question.
« Reply #1 on: June 10, 2004, 02:34:13 PM »
680x0 reads two memory addresses at reset, 0 and 4. 0 contains the initial SSP and 4 contains the initial PC.

Anyway, Amiga ROM is made to appear at address 0 via ROM overlay bit in cia register at reset. That is the ROM appears at both 0x0 and 0xf80000 (for 256K roms, the 256K is mirrored twice to 0xf80000 and 0xfc0000).

The first longword is ROM id + jmp opcode, SSP will contain this (bogus) value initially (it's soon replaced by low chipmem address in the ROM code). The 2nd longword is ptr to ROM startup code (0xf80?? or 0xfc00??), and this is the address that will be executed. This code sets up some HW regs, turns off ROM overlay, initializes CPU regs, does initial system integrity checking, scans for onboard memory and begins executing resident modules.

The end of the ROM is not used for anything, except ROMSize and checksum. The other values seem to be some sort of padding, without any function.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show all replies
    • http://www.iki.fi/sintonen/
Re: ROM format/structure question.
« Reply #2 on: May 20, 2007, 11:27:05 AM »
Heh indeed, didn't spot that before either. I can think of some clever applications for this stuff, say for example having interrupts relocated on 68000, much like with VBR on 68010. Obviously that'd require a custom ROM, but still... :-)