Checking for alt-ram ?

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Checking for alt-ram ?

Postby Cyprian » Fri Jan 08, 2016 4:01 pm

npomarede wrote:Nope, Hatari supports alt-ram for Falcon and TT mode since Hatari 1.9, which was quite a lot of changes to handle, as this requires 32 bit support in memory access thus a 68030 cpu, and not a 68000.

Nicolas


I wasn't precise enough. I should mentioned that I was referring to the ST series. I wasn't talking about the TT/Falcon, for them Hatari has dedicated TT-RAM size setup.



npomarede wrote:mfro is right, alt ram (also called fast ram on TT) starts at $100000, not at $40000 as you suggest.
This is why blitter/fdc/hdc can't transfer data directly to alt RAM, and that's also why the CT60 for example came with a patched tos that redirected lots of OS calls to works in 32 bit mode.

Nicolas

Again, I'm talking about the ST.
MMU chip in the ST series supports max 4MB of ST-RAM: range from $0 to $3FFFFF. Main impact of that limitation is that on the real hardware you are not able to:
- set Shifter video address beyond $400000 memory address;
- set DMA address beyond $400000 memory address;
- SoundDMA address beyond $400000 memory address.

Only BLiTTER have access to the full 24bit memory range.

On the ST when you need more ram than 4MB you should install ALT-RAM board and appropriate driver.
That driver should install "_FRB" cookie and add additional memory with Maddalt function.
After that, you can address ALT-RAM with Mxalloc function because on the ST Malloc is limited to $0 to $3FFFFF address range.

Usually ALT-RAM starts from address $400000.


And now back to emulators.
Currently, when you set the RAM to 14MB in Hatari/Steem then they behaves differently than the ST:
- you are able to set Shifter/DMA/SoundDMA to ANY memory area, also beyond $400000;
- you can address ANY memory are with Malloc, also beyond $400000;
- there is no "_FRB" cookie.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Checking for alt-ram ?

Postby Cyprian » Fri Jan 08, 2016 4:18 pm

exxos wrote:
Cyprian wrote:yep,
Currently Steem and Hatari doesn't support ALT-Ram. It seems that they 'hacked' emulated hardware to support full 14MB ST-RAM.


I think that was talked about breafly in another thread a few days go somewhere.


Anyway, so the cookie part should be working fine now. Though how to I now check if the program itself was executed in alt-ram ?

From my point of view "_FRB" is mandatory when you have installed ALT-RAM in the ST or TT-RAM in the TT/Falcon.
(that cookie is set in my TT and also by Magnum and Monster ALT-RAM boards)

You decide which memory will be used by your program by setting PRG-Flags: http://toshyp.atari.org/en/005005.html#ph_prgflags

Also, I would suggest you to use Mxalloc and "Allocate ST-RAM only" option when you need a memory block which should be accessible by Shifter/Videl or SoundDMA.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
npomarede
Atari God
Atari God
Posts: 1178
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Checking for alt-ram ?

Postby npomarede » Fri Jan 08, 2016 6:20 pm

Cyprian wrote:
npomarede wrote:Nope, Hatari supports alt-ram for Falcon and TT mode since Hatari 1.9, which was quite a lot of changes to handle, as this requires 32 bit support in memory access thus a 68030 cpu, and not a 68000.

Nicolas


I wasn't precise enough. I should mentioned that I was referring to the ST series. I wasn't talking about the TT/Falcon, for them Hatari has dedicated TT-RAM size setup.

Yes, the subject in this thread was not very clear, I thought it was about TT ram, not pushing STF/STE to 14 MB

And now back to emulators.
Currently, when you set the RAM to 14MB in Hatari/Steem then they behaves differently than the ST:
- you are able to set Shifter/DMA/SoundDMA to ANY memory area, also beyond $400000;
- you can address ANY memory are with Malloc, also beyond $400000;
- there is no "_FRB" cookie.


Regarding masking, Hatari prevents setting the shifter or the FDC above $400000 (I would need to check if it's also done for dmasound), so from that point of view it's similar to real ST.
As for adding 14 MB in Hatari and Steem, it's done the simple way by modifying memtop and validating the corresponding memory checksum in TOS variables to prevent TOS from checking the RAM itself. This way, extra ram is visible to TOS. I agree setting the "_FRB" cookie could be possible, but maybe this also requires a specific TOS to take _FRB into account (at the moment, simply raising memtop to 14 MB will work with any TOS) ?
Why shouldn't malloc allow to access memory beyond $400000 ?

Nicolas

User avatar
shoggoth
Nature
Nature
Posts: 854
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden
Contact:

Re: Checking for alt-ram ?

Postby shoggoth » Fri Jan 08, 2016 6:29 pm

Malloc() allocates according to the flags in the executable header, this may be STRAM, TTRAM, or both. So it does allocate beyond 0x400000.
Ain't no space like PeP-space.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1558
Joined: Sun Jul 31, 2011 1:11 pm

Re: Checking for alt-ram ?

Postby Eero Tamminen » Fri Jan 08, 2016 11:09 pm

npomarede wrote:Alt-RAM requires a falcon (with some hack in TOS 4, automatically done by Hatari) or a TT (with TOS 3).


And EmuTOS works both with TT and Falcon. :-)

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Checking for alt-ram ?

Postby Cyprian » Fri Jan 08, 2016 11:49 pm

you right with Malloc.

I've just checked Shifter and SoundDMA and both emulators shows and plays valid data placed at listed below addresses:
- ST-RAM - $200000
- ALT-RAM - $600000

The second case shouldn't show/play valid data on the ST due to limitation the MMU.
Attached you can find executable file and source code.
You do not have the required permissions to view the files attached to this post.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
npomarede
Atari God
Atari God
Posts: 1178
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Checking for alt-ram ?

Postby npomarede » Sat Jan 09, 2016 10:37 am

Cyprian wrote:you right with Malloc.

I've just checked Shifter and SoundDMA and both emulators shows and plays valid data placed at listed below addresses:
- ST-RAM - $200000
- ALT-RAM - $600000

The second case shouldn't show/play valid data on the ST due to limitation the MMU.
Attached you can find executable file and source code.

You're right, I checked Hatari sources and video address is masked only when writing to STE ff8205/07/09. I will change this for next version.
I don't have my STE at the moment, if you write $FF to $FF8201, $FF8205 or $FF8903 and read the content just after the write, do you get $3F in all cases ?

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Checking for alt-ram ?

Postby Cyprian » Sat Jan 09, 2016 8:19 pm

You can find figures after write write $FF:
;1040 STe 4MB
; $FF8201 3F
; $FF8205 3F
; $FF8903 3F
; $FF8909 3F
; $FF890F 3F

;520 STm 2MB
; $FF8201 3F
; $FF8205 27

; Hatari STE 14MB
; $FF8201 FF
; $FF8205 3F
; $FF8903 FF
; $FF8909 FF
; $FF890F FF

;Steem STE 14MB
; $FF8201 3F
; $FF8205 3F
; $FF8903 FF
; $FF8909 FF
; $FF890F FF
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
npomarede
Atari God
Atari God
Posts: 1178
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Checking for alt-ram ?

Postby npomarede » Sat Jan 09, 2016 8:44 pm

Thanks, I will take this into account for FF8201 and FF8903/9/F in next Hatari version.

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Checking for alt-ram ?

Postby Cyprian » Sat Jan 09, 2016 9:01 pm

many thanks.
another difference is that CPU memory access isn't rounded to 4
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
npomarede
Atari God
Atari God
Posts: 1178
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Checking for alt-ram ?

Postby npomarede » Sat Jan 09, 2016 11:21 pm

Cyprian wrote:many thanks.
another difference is that CPU memory access isn't rounded to 4

Regarding memory access aligned on 4 cycles, this is already supported in the devel version of Hatari, so it will be available in Hatari 1.10.


Social Media

     

Return to “Other BASIC”

Who is online

Users browsing this forum: No registered users and 3 guests