See here for more information viewtopic.php?f=20&t=7296
viewtopic.php?t=7286
ST536 STE EDITION
Re: ST536 STE EDITION
cold boot:
- detect installed RAM types
- test the installed RAM areas
- optionally shadow ROM to RAM
- install MMU pagetables making the RAM & shadowed ROM areas available with the correct cache flags etc.
- mess with the warm-reset vector so all this doesn't need repeated on a warm boot
- MAYBE perform a warm-reset so every 'real' journey to the desktop is exactly the same (i.e. always via a warm boot, even from a cold boot)
warm boot:
- find the FastRAM from state detected/stored somewhere on the cold boot
- put the MMU table registers back (already set up)
- coast onwards to the usual boot sequence
Re: ST536 STE EDITION
The current problem is as was before, Hatari seems to ignore TTram with 206 for some reason. So hard to test the fixes without burning a ROM.. every..single.. time...

Re: ST536 STE EDITION
You don't have '24 bit addressing' turned on, do you? and Stock 2.06 doesn't do any TT-RAM detection, obviously.exxos wrote: Fri Jun 06, 2025 11:56 am My current build of 206 now runs DOTT ! BUT I've "lost" TTram now. Likely one of the PAK patches turned it on. So need to fix that next.
The current problem is as was before, Hatari seems to ignore TTram with 206 for some reason. So hard to test the fixes without burning a ROM.. every..single.. time...![]()
I saw you mention grabbing the latest EmuTOS. 1.3 is still the current release although 1.4 is scheduled in the next week or two, I think.
BW
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
Re: ST536 STE EDITION
It seems Hatari turns it on automaticallyBadwolf wrote: Fri Jun 06, 2025 12:06 pm You don't have '24 bit addressing' turned on, do you? and Stock 2.06 doesn't do any TT-RAM detection, obviously.

Thanks, thought it had moved on a bit since I last did a ROM.I saw you mention grabbing the latest EmuTOS. 1.3 is still the current release although 1.4 is scheduled in the next week or two, I think.
Re: ST536 STE EDITION
*only* 58 PAK patches in the startup file

Ironically someone put "PAK WHY" in there already, but WHY indeed !
So next I need to go back to my original 206 build and disable that code and see if things still work.. hopefully that will be the only problem..
Re: ST536 STE EDITION
This is suspicious. Mono check getting triggered in EmuTOS -- an unrelated codebase. Mono check getting patched here for an 030 accelerator. Wherefore?
BW
Smalliermouse ST-optimised USB mouse adapter based on SmallyMouse2
FrontBench The Frontier: Elite 2 intro as a benchmark
Re: ST536 STE EDITION

This is suspicious. Mono check getting triggered in EmuTOS -- an unrelated codebase. Mono check getting patched here for an 030 accelerator. Wherefore?

Re: ST536 STE EDITION

I copied my original 206 back over and patched that one thing.. DOTT now runs! So 100% that bit of code caused the resetting issues with DOTT with my build of TOS.
For some reason that "patch" was done in the PAK patches

Next to burn a ROM and see if I get TTram back now..
Re: ST536 STE EDITION

Rebooted and now running.. still possible something is unstable on the booster though... but this is a HUGE step forward at least!
Re: ST536 STE EDITION

But as it mentions checking monodetect twice, maybe its trying to debounce the signal.. Maybe stems from previous attempts at fixing the mono detect issue which was replaced by the F-series chip on later motherboard revisions.. But even so, a debounce would make sense as a fix.
But still , It doesn't make much sense why the registers seems to get cleaned and ignored with PAK ?!
All this needs someone with more than 2 functioning brain cells to figure out..

Analysis of 68k Atari ST TOS Monochrome Detection Snippet and TP_666 Reset Issue
The provided 68k Atari ST TOS code snippet is a routine for detecting a monochrome monitor by checking the MFP (Multi-Function Peripheral) chip's General Purpose I/O Port (GPIP) and the sound matrix control register (
Code: Select all
sndmactl
Code: Select all
TP_666
Code: Select all
1
Code: Select all
TP_666 = 1
Code: Select all
moncheck:
#if TP_666 /* PAK ?why? */
move.b #0,d0
#else
move.b ((sndmactl)+1).w,d0
#endif
move.b (MFP_GPIP).w,d1
btst #7,d1
sne d1
move.b (MFP_GPIP).w,d2
btst #7,d2
sne d2
cmp.b d1,d2
bne.s moncheck
#if TP_666 /* PAK ?why? */
move.b #0,d0
#else
cmp.b ((sndmactl)+1).w,d0
#endif
bne.s moncheck
move.w (a7)+,sr
btst #0,d0
beq.s nomoncheck
not.b d1
nomoncheck:
1. Initial Check and Conditional Code:
Code: Select all
#if TP_666
move.b #0,d0
#else
move.b ((sndmactl)+1).w,d0
#endif
Code: Select all
TP_666 = 1
Code: Select all
d0
Code: Select all
0
- Otherwise, it reads the second byte of
Code: Select all
sndmactl
Code: Select all
d0
2. Monochrome Detection Loop:
Code: Select all
move.b (MFP_GPIP).w,d1
btst #7,d1
sne d1
move.b (MFP_GPIP).w,d2
btst #7,d2
sne d2
cmp.b d1,d2
bne.s moncheck
Code: Select all
d1
Code: Select all
d2
Code: Select all
sne
Code: Select all
0xFF
Code: Select all
0x00
- Loops back to
Code: Select all
moncheck
3. Second Conditional Check:
Code: Select all
#if TP_666
move.b #0,d0
#else
cmp.b ((sndmactl)+1).w,d0
#endif
bne.s moncheck
Code: Select all
TP_666 = 1
Code: Select all
d0
Code: Select all
0
Code: Select all
sndmactl
- Otherwise, it checks if
Code: Select all
sndmactl+1
Code: Select all
d0
4. Final Steps:
Code: Select all
move.w (a7)+,sr
btst #0,d0
beq.s nomoncheck
not.b d1
nomoncheck:
Code: Select all
sr
- If bit 0 of
Code: Select all
d0
Code: Select all
d1
Code: Select all
TP_666 = 1
Code: Select all
d0 = 0
Code: Select all
d1
Why TP_666 = 1 Causes Resets
When
Code: Select all
TP_666 = 1
Code: Select all
d0 = 0
Code: Select all
sndmactl
1. Bypassing Hardware Checks:
- Skipping
Code: Select all
sndmactl
2. Impact on d0 and Logic:
- With
Code: Select all
d0 = 0
Code: Select all
btst #0,d0
Code: Select all
d1
3. Potential Infinite Loop:
- The
Code: Select all
bne.s moncheck
Code: Select all
sndmactl
4. Game-Specific Assumptions:
- The
Code: Select all
TP_666
5. System Reset Triggers:
- Incorrect video mode settings or invalid hardware accesses (e.g., to the Shifter or sound chip) can trigger resets on the Atari ST, especially in interrupt contexts.
Debugging Suggestions
- Trace Video Initialization: Check how
Code: Select all
d1
- Monitor Hardware Accesses: Inspect code accessing video/sound registers post-routine.
- Test Monitors: Try with monochrome and color monitors, toggling
Code: Select all
TP_666
- Check sndmactl: Verify its role in your ST model for monitor or sound settings.
- Patch TP_666: Set
Code: Select all
TP_666 = 0
b]Emulator Debugging[/b]: Use Hatari to step through code, monitoring
Code: Select all
d0
Code: Select all
d1
Code: Select all
d2
Conclusion
The
Code: Select all
TP_666 = 1
Code: Select all
sndmactl