Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline DoobreyTopic starter

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 1876
    • Show only replies by Doobrey
    • http://www.doobreynet.co.uk
ROM format/structure question.
« on: June 09, 2004, 02:25:44 AM »
Does anyone know the what the last 16 bytes in the Amigas ROM is for?..
 I know 8 bytes before it is the checksum and the rom size,but I`ve drawn a blank on the last bit.

 All the 3.x ROMS I`ve seen have the same series of 16bit words at the end.
 0018,0019,001A,001B,001C,001D,001E,001F.

I just found it strange, since unused space is normally set to $FF..
On schedule, and suing
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: ROM format/structure question.
« Reply #1 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 Castellen

Re: ROM format/structure question.
« Reply #2 on: June 09, 2004, 08:46:28 PM »
Check the Motorola 68000 datasheet to see if it does anything with the data at those addresses.
Could be something like reset vectors or interrupt vectors??
 

Offline DoobreyTopic starter

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 1876
    • Show only replies by Doobrey
    • http://www.doobreynet.co.uk
Re: ROM format/structure question.
« Reply #3 on: June 10, 2004, 01:27:27 PM »
I don`t think they could be vectors, as some of them would result in the code starting at odd locations. (odd as in not even, not odd as in wierd !)

 I`m beginning to think they`re just leftovers from debugging.
On schedule, and suing
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: ROM format/structure question.
« Reply #4 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 DoobreyTopic starter

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 1876
    • Show only replies by Doobrey
    • http://www.doobreynet.co.uk
Re: ROM format/structure question.
« Reply #5 on: June 11, 2004, 12:35:52 AM »
Ta for the info Piru,
 I`d only just stopped playing around with hacking the ROM, zeroing that pattern made no difference to anything, so like you say, just junk..
 Oh well, back to messing around again..
I just made myself a new ROM image with Piru`s Exec44.1, removed carddisk.device,workbench and icon librarys, added some BlizKick modules and replaced bits with some of the OS3.9 modules.
 Now I`ve got 80Kb free space to play with.. :evilgrin:
On schedule, and suing
 

Offline Sparky

  • Sr. Member
  • ****
  • Join Date: Dec 2003
  • Posts: 286
    • Show only replies by Sparky
Re: ROM format/structure question.
« Reply #6 on: June 11, 2004, 02:18:08 AM »
Quote

Doobrey wrote:
Ta for the info Piru,
 I`d only just stopped playing around with hacking the ROM, zeroing that pattern made no difference to anything, so like you say, just junk..
 Oh well, back to messing around again..
I just made myself a new ROM image with Piru`s Exec44.1, removed carddisk.device,workbench and icon librarys, added some BlizKick modules and replaced bits with some of the OS3.9 modules.
 Now I`ve got 80Kb free space to play with.. :evilgrin:


Now making your own ROM image would be a rather nice tutorial ...
 

Offline DoobreyTopic starter

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 1876
    • Show only replies by Doobrey
    • http://www.doobreynet.co.uk
Re: ROM format/structure question.
« Reply #7 on: June 12, 2004, 01:08:21 AM »
Don`t worry Sparky, when I`m done it`ll be a simple point and click program that`ll do it for you.
 I suppose I`d better figure out what stuff you can add to what machine, and what stuff you can`t remove too !

 There`s even more stuff in the pipeline, but if I told you, I`d have to kill you  :quickdraw:
On schedule, and suing
 

Offline Nickman

  • Sr. Member
  • ****
  • Join Date: Feb 2002
  • Posts: 255
  • Country: 00
    • Show only replies by Nickman
Re: ROM format/structure question.
« Reply #8 on: April 26, 2006, 04:14:08 PM »
Quote

Doobrey wrote:
Don`t worry Sparky, when I`m done it`ll be a simple point and click program that`ll do it for you.
 I suppose I`d better figure out what stuff you can add to what machine, and what stuff you can`t remove too !

 There`s even more stuff in the pipeline, but if I told you, I`d have to kill you  :quickdraw:


I'm realy looking forward to that :)

I'm also planning on makeing your kickrom flash thingy when your are done with it an posts some nice description :-D
----
Amiga1200T
Mediator/Voodoo3 3000/100mbit NIC/SB128
Blizzppc 603e 210Mhz 040 25Mhz, 192 mb ram,Bvision
SCSI Ultra320 74GB HD,4x Burner,MO drive.
 

Offline DoobreyTopic starter

  • Hero Member
  • *****
  • Join Date: Oct 2002
  • Posts: 1876
    • Show only replies by Doobrey
    • http://www.doobreynet.co.uk
Re: ROM format/structure question.
« Reply #9 on: May 20, 2007, 12:48:00 AM »
Quote

Castellen wrote:
Check the Motorola 68000 datasheet to see if it does anything with the data at those addresses.
Could be something like reset vectors or interrupt vectors??


Bingo !
The CPU uses that data at the end of the ROM to map the hardware interrupt level to an autovector.
 Just stumbled upon this from the RKM Libs/Interrupts.. hey, it only took me 3 years to get back to this and follow Anthony's advice ! :lol:

Quote
The priority level of the new interrupt is used to index into the top seven words of the processor address space. The odd byte (a vector number) of the indexed word is fetched and then shifted left by two to create an offset into the processor's auto-vector interrupt table.The vector offsets used are in the range of $064 to $07C.
On schedule, and suing
 

Offline Jeff

  • VIP / Donor - Lifetime Member
  • Hero Member
  • *****
  • Join Date: Dec 2003
  • Posts: 1398
    • Show only replies by Jeff
Re: ROM format/structure question.
« Reply #10 on: May 20, 2007, 02:15:32 AM »
@Doobrey

I'll join the list of people that can't wait:-D Thank you for what you have done so far!

Jeff
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: ROM format/structure question.
« Reply #11 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... :-)
 

Offline alexh

  • Hero Member
  • *****
  • Join Date: Apr 2005
  • Posts: 3644
    • Show only replies by alexh
    • http://thalion.atari.org
Re: ROM format/structure question.
« Reply #12 on: May 20, 2007, 02:24:19 PM »
Doobrey we love you. (In a totally platonic, non sexual way).