The ST would appear to have 2 places it can execute code from: a) in ROM & b) in RAM.
It is clear that the first few cold start instructions must execute from ROM and any code on disk must be loaded into RAM for execution.
After initial startup what happens to the ROM is the code copied into faster RAM for normal execution or is it executed directly from the slower ROM?
Where do I find documentation on kernel mode execution and MMU functions?
Does the MMU remap any physical block(s) into anywhere in the CPUs address space?
How do I set mapping and set protection on regions of memory?
Thanks
Peter
MMU operation and ST Startup & running where does code live?
Moderator: troed
Re: MMU operation and ST Startup & running where does code live?
given that only TT and Falcon have a processor with builtin MMU, I guess you are looking for TOS v3 and more, not ST.
Re: MMU operation and ST Startup & running where does code live?
EDIT: This image flow may help with how the ST starts up
Re: MMU operation and ST Startup & running where does code live?
ROM is not copied to RAM unless a program specifically copies ROM to alt-ram for faster execution for example. Code still executes from ROM otherwise.
https://www.exxosforum.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
https://www.exxosforum.co.uk/atari/store2/ - All my hardware mods for sale - Please help support by making a purchase.
viewtopic.php?f=17&t=1585 Have you done the Mandatory Fixes ?
Just because a lot of people agree on something, doesn't make it a fact. ~exxos ~
People should find solutions to problems, not find problems with solutions.
- rubber_jonnie
- Site Admin
- Posts: 10472
- Joined: Thu Aug 17, 2017 7:40 pm
- Location: Essex
- Contact:
Re: MMU operation and ST Startup & running where does code live?
Normal operation is for OS code to be executed from the ROM. Unless of course a cartridge (Such as a diag cart) is detected, in which case the ROMs on the cart will run instead. Still from the ROM though and not RAM IIRC.
The only exceptions I'm aware of are the original STs that came with OS on floppy disk or if I understand it correctly (And I may have this wrong) when you use a patcher to load an alternate version of TOS from floppy.
Since you are probably not doing either of the above then take it as running from ROM.
The only exceptions I'm aware of are the original STs that came with OS on floppy disk or if I understand it correctly (And I may have this wrong) when you use a patcher to load an alternate version of TOS from floppy.
Since you are probably not doing either of the above then take it as running from ROM.
Collector of many retro things!
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
800XL and 65XE both with Ultimate1MB,VBXL/XE & PokeyMax, SIDE3, SDrive Max, 2x 1010 cassette, 2x 1050 one with Happy mod, 3x 2600 Jr, 7800 and Lynx II
Approx 20 STs, including a 520 STM, 520 STFMs, 3x Mega ST, MSTE & 2x 32 Mhz boosted STEs
Plus the rest, totalling around 50 machines including a QL, 3x BBC Model B, Electron, Spectrums, ZX81 etc...
Re: MMU operation and ST Startup & running where does code live?
Is running code from ROM actually any slower than RAM on a stock ST?
Re: MMU operation and ST Startup & running where does code live?
I don't believe so, no.
BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
DSTB1 Open source 16Mhz 68k and AltRAM accelerator for the ST
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
- thorsten.otto
- Posts: 148
- Joined: Mon Nov 04, 2019 2:20 am
Re: MMU operation and ST Startup & running where does code live?
Question about ROM have already been answered above i think. Regarding MMU: as normally only TT and Falcon can have one, TOS 1.x and 2.x don't do anything with it. Even in TOS 3.x and above, only the TTR registers are setup to map the $FF0000 range to $FFFF0000 so you can access I/O at both addresses. Only a minimal MMU translation table is setup. There are however some programs that make use of it: MiNT (when using Memory-Protection), MAPROM (copies ROM to RAM, and optionally protects it to be readonly), and several Virtual Memory Managers like Outside and Vram.
Explaining how to set up the mapping is beyond the scope here Basically, everything is explained in the processor manuals. It is rather complicated, though. You could have a look at mint sources, most of it is in https://github.com/freemint/freemint/bl ... mprot030.c