misterblack1 / plexus-p20

Information Repository for Plexus Unix computers like the Plexus P/20
38 stars 7 forks source link

Some mapping on the ROM images #6

Open inbarraz opened 1 month ago

inbarraz commented 1 month ago

Loading addresses:

U17 base address is 0x800000 U15 base address is 0x808000

This means they are adjacent and consecutive. ROM code contains some hardcoded addresses which helped figure this out.

the1stArchyx commented 3 weeks ago

Both ROMs start with a complete 680x0 Exception Vector table (to which the Vector Base Register, VBR, is initially set to point to), which is 0x400 bytes long. The whole table is full of hard-coded 32-bit pointers. The first pointer sets the initial Interrupt Stack Pointer, which reveals a 16 KiB patch of memory at 0xC00000. The second pointer sets the Program Counter for the CPU to start executing code.

I dug deep enough into the code to figure out some of the memory map:

It's incomplete, of course, but still a good starting point to dig even deeper.

c-logic commented 2 weeks ago

any function in the (virtual) memory mapping still has to map the RAM to 0x0, the processor runs normally with the exception table on address 0x0 (SP) with reset address 0x4.

the1stArchyx commented 2 weeks ago

any function in the (virtual) memory mapping still has to map the RAM to 0x0, the processor runs normally with the exception table on address 0x0 (SP) with reset address 0x4.

The ROM(s) are briefly mapped to 0x0 to get the CPU(s) started after reset, just like in a classic Amiga. Once a 680x0 CPU runs code, those two memory addresses become irrelevant to CPU function.

The base model 68000 is the only CPU that'll actually require RAM (or ROM) at the start of the memory map as the Vector Base Register is fixed at 0x0, the exception vectors starting from 0x8. All other CPUs in the 680x0 family have a modifyable VBR and can have the exception vector table at any even address (preferably aligned to 32-bit word size, possibly required for the externally 32-bit CPUs) within the accessible memory space.

ewenmcneill commented 2 weeks ago

FTR, there's a shared Ghidra repo, where various people have gone a fair way into reverse engineering the ROMs. And the Ghidra project has the known memory map defined in it.

https://github.com/misterblack1/plexus-p20/tree/main/ghidra-project

has details of how to access the Ghidra server with the shared project. I believe anonymous access is enabled for read-only access; or direct message 'mxshift' on the Usagi Discord server (which Adrian's Digital Basement has a couple of channels in now) to get an account with write access too. (There's a lot more discussion in the #plexus-p20 channel on the Usagi Discord server; IIRC most of Adrian's recent Plexus videos should have a link to the Discord server.)

Ewen