You will not be able to post if you are still using Microsoft email addresses such as Hotmail etc
See here for more information viewtopic.php?f=20&t=7296
BOOKMARK THIS PAGE !
https://www.exxosforum.co.uk:8085/IP_CHECK/
You can unban yourself if needed. It also sends me reports to investigate the ban.
DO NOT USE MOBILE / CGNAT DEVICES WHERE THE IP CHANGES CONSTANTLY!
At this time, it is unfortunately not possible to whitelist users when your IP changes constantly.
You may inadvertently get banned because a previous attack may have used the IP you are now on.
So I suggest people only use fixed IP address devices until I can think of a solution for this problem!

MMU operation and ST Startup & running where does code live?

News,announcements,programming,fixes,game patches & discussions.
microman
Posts: 29
Joined: 28 Jan 2022 15:55

MMU operation and ST Startup & running where does code live?

Post by microman »

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
User avatar
sporniket
Site sponsor
Site sponsor
Posts: 1161
Joined: 26 Sep 2020 21:12
Location: France

Re: MMU operation and ST Startup & running where does code live?

Post by sporniket »

given that only TT and Falcon have a processor with builtin MMU, I guess you are looking for TOS v3 and more, not ST.
User avatar
Icky
Site Admin
Site Admin
Posts: 4358
Joined: 03 Sep 2017 10:57
Location: UK

Re: MMU operation and ST Startup & running where does code live?

Post by Icky »

EDIT: This image flow may help with how the ST starts up

System_Startup.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
exxos
Site Admin
Site Admin
Posts: 28224
Joined: 16 Aug 2017 23:19
Location: UK

Re: MMU operation and ST Startup & running where does code live?

Post by exxos »

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.
User avatar
rubber_jonnie
Site Admin
Site Admin
Posts: 14816
Joined: 17 Aug 2017 19:40
Location: Essex

Re: MMU operation and ST Startup & running where does code live?

Post by rubber_jonnie »

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.
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...
User avatar
DoG
Posts: 1293
Joined: 07 Apr 2018 12:26

Re: MMU operation and ST Startup & running where does code live?

Post by DoG »

Icky wrote: 11 Feb 2022 15:21 This thread may help with how the ST starts up
"You are not authorised to read this forum."
User avatar
Icky
Site Admin
Site Admin
Posts: 4358
Joined: 03 Sep 2017 10:57
Location: UK

Re: MMU operation and ST Startup & running where does code live?

Post by Icky »

DoG wrote: 11 Feb 2022 16:36 "You are not authorised to read this forum."
@DoG - My bad, edited my original post.
User avatar
Smonson
Posts: 717
Joined: 28 Oct 2017 10:21
Location: Canberra, Australia

Re: MMU operation and ST Startup & running where does code live?

Post by Smonson »

Is running code from ROM actually any slower than RAM on a stock ST?
User avatar
Badwolf
Site sponsor
Site sponsor
Posts: 3040
Joined: 19 Nov 2019 12:09

Re: MMU operation and ST Startup & running where does code live?

Post by Badwolf »

Smonson wrote: 16 Feb 2022 02:16 Is running code from ROM actually any slower than RAM on a stock ST?
I don't believe so, no.

BW
DFB1 Open source 50MHz 030 and TT-RAM accelerator for the Falcon
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
User avatar
thorsten.otto
Posts: 148
Joined: 04 Nov 2019 02:20

Re: MMU operation and ST Startup & running where does code live?

Post by thorsten.otto »

microman wrote: 11 Feb 2022 14:21 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?
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

Return to “SOFTWARE PROGRAMMING & DISCUSSION”

Who is online

Users browsing this forum: CCBot and 2 guests