Adding to my previous post: One can easily verify correct Alt-RAM detection (without having an Atari TT) with Hatari:
And here's a photo from back when I had by TT temporarily at 512 MiB TT-RAM:
I already pointed to EmuTOS's TT-RAM detection routine in my previous post. It goes through memory in 1 MiB steps and checks two things:
1. there is no bus error,
2. some test data can be written and read back.
If I had a PiStorm, I would check why tests apparently start to fail above 64 MiB. Perhaps there is some mirroring of memory?
EMUTos + AltRAM
-
czietz
- Posts: 586
- Joined: 14 Jan 2018 13:02
Re: EMUTos + AltRAM
You do not have the required permissions to view the files attached to this post.
-
czietz
- Posts: 586
- Joined: 14 Jan 2018 13:02
Re: EMUTos + AltRAM
To better explain what I mean: Purely as a hypothesis (I don't have a PiStorm and I wouldn't even know where to check) let's consider what might happen: EmuTOS checks for the 65th MiB of TT-RAM, which is located at 65+16 = 81 MiB. Now, the PiStorm's CPU emulator says "sorry, I can't handle that" because only 64 MiB of TT-RAM are mapped. If, however, this causes the request to be put onto the Atari's bus (which is only 24 bits), it will wrap around and look like an access to ST-RAM. Thus, the ST-RAM will "mirror" above the TT-RAM. This, obviously, causes the TT-RAM detection routine to fail to detect the correct amount.czietz wrote: 02 Aug 2023 17:43 If I had a PiStorm, I would check why tests apparently start to fail above 64 MiB. Perhaps there is some mirroring of memory?
Can you please make sure that directly above the mapped TT-RAM there is either a bus-error (preferred solution) or at least 1 MiB of memory that cannot be written to?
-
dad664npc
- Posts: 166
- Joined: 12 Sep 2022 14:32
- Location: Oxfordshire
Re: EMUTos + AltRAM
Many thanks for the feedback. So I have a bit of work then to find out what I've buggered up :)
ATARI STfm, STe, Mega ST, TT
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
Pico HDC - https://bbansolutions.co.uk
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
Pico HDC - https://bbansolutions.co.uk
-
czietz
- Posts: 586
- Joined: 14 Jan 2018 13:02
Re: EMUTos + AltRAM
I think I might have found something. Note though that this is my first look ever into the PiStorm/PiStorm-Atari codebase, so I might be wrong.
This function appears to handle byte-sized memory reads: https://github.com/gotaproblem/pistorm- ... tor.c#L652
However, if the read request cannot be handled internally (by platform_read_check), the function passes the request onto the bus, even if the high byte (A31-A24) of the address is not zero. Imho, this function should generate a bus-error instead. Or at least return 0, like the Amiga implementation https://github.com/captain-amygdala/pis ... tor.c#L945. The same thing applies to all other read and write functions.
(I can't explain, though, why this works for up to 32 MiB TT-RAM.)
This function appears to handle byte-sized memory reads: https://github.com/gotaproblem/pistorm- ... tor.c#L652
However, if the read request cannot be handled internally (by platform_read_check), the function passes the request onto the bus, even if the high byte (A31-A24) of the address is not zero. Imho, this function should generate a bus-error instead. Or at least return 0, like the Amiga implementation https://github.com/captain-amygdala/pis ... tor.c#L945. The same thing applies to all other read and write functions.
(I can't explain, though, why this works for up to 32 MiB TT-RAM.)
-
dad664npc
- Posts: 166
- Joined: 12 Sep 2022 14:32
- Location: Oxfordshire
Re: EMUTos + AltRAM
Thanks for looking. Now resolved, not sure why this is needed - but hey-ho
if ( ( address & 0xFF000000 ) == 0xFF000000 )
address &= 0x00FFFFFF;
if (address & 0xFF000000)
return 0;
if ( ( address & 0xFF000000 ) == 0xFF000000 )
address &= 0x00FFFFFF;
if (address & 0xFF000000)
return 0;
You do not have the required permissions to view the files attached to this post.
ATARI STfm, STe, Mega ST, TT
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
Pico HDC - https://bbansolutions.co.uk
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
Pico HDC - https://bbansolutions.co.uk
-
Cyprian
- Posts: 542
- Joined: 22 Dec 2017 09:16
- Location: Warszawa, Poland
Re: EMUTos + AltRAM
CPU type isn't "68000"dad664npc wrote: 04 Aug 2023 05:08 Thanks for looking. Now resolved, not sure why this is needed - but hey-ho
if ( ( address & 0xFF000000 ) == 0xFF000000 )
address &= 0x00FFFFFF;
if (address & 0xFF000000)
return 0;
IMG_0111.jpg
Is it ok in your PiStorm case?
ATW800/2 / V4sa / Lynx I / Mega ST 1 / 7800 / Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
http://260ste.atari.org
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
http://260ste.atari.org
-
dad664npc
- Posts: 166
- Joined: 12 Sep 2022 14:32
- Location: Oxfordshire
Re: EMUTos + AltRAM
CPU type can be 68000 to 68040 on the PiStorm.
Are you asking if the PiStorm fits in an Atari ST or STe? That'll be a big fat NO :) But stormy has installed in an H5
Are you asking if the PiStorm fits in an Atari ST or STe? That'll be a big fat NO :) But stormy has installed in an H5
ATARI STfm, STe, Mega ST, TT
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
Pico HDC - https://bbansolutions.co.uk
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
Pico HDC - https://bbansolutions.co.uk
-
Cyprian
- Posts: 542
- Joined: 22 Dec 2017 09:16
- Location: Warszawa, Poland
Re: EMUTos + AltRAM
ok
no, just CPU type in PiSTormdad664npc wrote: 04 Aug 2023 10:22 Are you asking if the PiStorm fits in an Atari ST or STe? That'll be a big fat NO :) But stormy has installed in an H5
ATW800/2 / V4sa / Lynx I / Mega ST 1 / 7800 / Portfolio / Lynx II / Jaguar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
http://260ste.atari.org
DDD HDD / AT Speed C16 / TF536 / SDrive / PAK68/3 / Lynx Multi Card / LDW Super 2000 / XCA12 / SkunkBoard / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
http://260ste.atari.org
-
thorsten.otto
- Posts: 148
- Joined: 04 Nov 2019 02:20
Re: EMUTos + AltRAM
There are cases where that emulation is needed (Hatari for example has an option for it). For example, in TOS 1.04, the vector number is placed in the upper 8 bits for exceptions. And IIRC, early version of Tempus (a blazingly fast text editor) used those bits to store the length of text lines.alexh wrote: 02 Aug 2023 13:51 That was a physical hardware limitation of the 68000 chip. I don't think emulated 68000 need to have that limitation.
-
Badwolf
- Site sponsor

- Posts: 3043
- Joined: 19 Nov 2019 12:09
Re: EMUTos + AltRAM
Wow. That's good to know. Thanks.thorsten.otto wrote: 05 Sep 2023 08:58 There are cases where that emulation is needed (Hatari for example has an option for it). For example, in TOS 1.04, the vector number is placed in the upper 8 bits for exceptions.
As an aside, ISTR early MacOS used the top 8 bits for something too.
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
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
Who is online
Users browsing this forum: apple [bot], ClaudeBot and 7 guests