Anyone debug why this crashes ?

News,announcements,programming,fixes,game patches & discussions.

Moderator: troed

User avatar
mfro
Posts: 122
Joined: Thu Dec 13, 2018 7:32 am

Re: Anyone debug why this crashes ?

Post by mfro »

exxos wrote: Mon Feb 08, 2021 11:24 am All I am trying to do is do a alt-ram installer, but nothing seems to work right :( If I do madalt, it seems ok, setup the FRB cookie, but then its like the altram is not setup...
First (probably obvious, but should be verified anyway): are you doing that on a TOS version that is supposed to support Maddalt() at all?
Do you check the Maddalt() return value (should be zero, otherwise something went wrong)?

Second (probably also obvious, but anyway): it should be clear that adding a certain block of Alternate RAM will only work once per session (i.e. should be done once at boot from an AUTO folder program and nowhere else).

Madalt() might (not entirely sure though) need to allocate memory in ST-RAM for its own purpose. If you do not leave enough room (Mshrink()) for the OS to allocate it while your program runs, Maddalt() will probably fail. Make sure you release unused memory immediately after start (as all clean code should do).

Setting up the _FRB cookie (or the Fast RAM buffer itself, respectively) is something different: as this requires permanent allocation of a buffer in ST-RAM, this can be done reliably from a TSR only (i.e. you need to call Mshrink() and Ptermres() at the end of your program instead of doing the "normal" Pterm() or Pterm0() exit). The buffer where your cookie points to needs to stay resident/reserved after the program terminates, otherwise *very* strange things will happen.

If these hints do not help, you should probably show your code.
And remember: Beethoven wrote his first symphony in C.
User avatar
exxos
Site Admin
Site Admin
Posts: 23498
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Anyone debug why this crashes ?

Post by exxos »

Thanks, @Icky would have to explain it as he took over the project..I think we have done all mentioned above.. We don't get back any error codes anywhere.. Its just like "TOS reports ram installed ok, but not really" kinda thing.

IIRC sysinfo sees the RAM and cookie, but trying to use PRGflags to run anything in alt-ram crashes... The alt-ram hardware is fine AFAIK, I can peek and poke it all day with STOS.

But as said in another thread, I cannot use YAART to test it as it does not "see" the alt-ram. Similar with GB6, it cannot see the alt-ram... but I can allocate alt-ram to run tests within GB6, but it acts oddly and crashes..

We are using TOS206 in these tests...
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.
czietz
Posts: 548
Joined: Sun Jan 14, 2018 1:02 pm

Re: Anyone debug why this crashes ?

Post by czietz »

exxos wrote: Mon Feb 08, 2021 1:02 pm But as said in another thread, I cannot use YAART to test it as it does not "see" the alt-ram.
Pro tip: At the prompt where YAARTTT asks you whether you want to test ST-RAM or TT-RAM, press "M" instead. Then, enter the start and end address of the memory you want to have tested. Does not require the memory to be registered with TOS.
User avatar
exxos
Site Admin
Site Admin
Posts: 23498
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Anyone debug why this crashes ?

Post by exxos »

czietz wrote: Mon Feb 08, 2021 6:07 pm Pro tip: At the prompt where YAARTTT asks you whether you want to test ST-RAM or TT-RAM, press "M" instead. Then, enter the start and end address of the memory you want to have tested. Does not require the memory to be registered with TOS.
I thought it had that option but thought I dreamt it! Will make a note of this thanks!
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.
Post Reply

Return to “SOFTWARE PROGRAMMING & DISCUSSION”