Page 2 of 3

Re: Anyone debug why this crashes ?

Posted: 25 Jan 2021 19:43
by exxos
Been trying to compile MAPROM but I think it uses 030 instructions :( I tried to strip out just the bits I need but its just chucking out errors and I have no idea why :(

Capture.PNG

Re: Anyone debug why this crashes ?

Posted: 25 Jan 2021 20:39
by Steve
Where is @agranlund when you need him? He solves everything, like the mere-cats.

Re: Anyone debug why this crashes ?

Posted: 25 Jan 2021 20:41
by exxos
Steve wrote: 25 Jan 2021 20:39 Where is @agranlund when you need him? He solves everything, like the mere-cats.
Vanished before xmas :pullhair: I tried to fiddle with MAPROM but it seems to be only geared for 030 etc so I cant even get it to compile nevermind run or make changes on a 68K.. I am trying to copy over chunks I need to work on those but then it just 2 bombs when run .. so no idea :(

Re: Anyone debug why this crashes ?

Posted: 25 Jan 2021 20:45
by mrbombermillzy
Not really sure what you are trying to do in the last post, but from the screenshot it appears like you have assembly instructions in your BSS section?

If you are mucking around with ROM data, I guess the code needs to be non relocatable, which means extra precautions which may have been ripped out in the process of removing the 030 specific code.

If you chuck me what you have and explain what you are doing to try to compile (any compiler directives,etc), I can maybe look for some obvious errors.

Re: Anyone debug why this crashes ?

Posted: 25 Jan 2021 21:00
by sporniket
I'm totally ignorant in that domain, and I infer that it is not the first time you handle alt ram, so please teach me if I say something dumb :
  • Before calling maddalt, try to mxalloc from the alt-ram exclusively. It MUST fails, unless it has detected it somehow and added it to its pool (cf. comment from @mfro ). If it succeed, print an error and quit.
  • Write a minimalist installer that mshrink according to the TPA (and move the stack pointer accordingly) to minimize the footprint and then use Ptermres instead of Pterm0. I expect that memory allocation cleaning in the case of Pterm0 to not happen, thus working around a buggy memory management (cf. same of mfro comment again).

Re: Anyone debug why this crashes ?

Posted: 26 Jan 2021 07:20
by thorsten.otto
exxos wrote: 25 Jan 2021 18:12 So this doesn't bomb, but doesn't seem to install alt-ram either :(
You have to add the "#" signs as shown in my example. Otherwise you pass the the values that happen to be found at addresses $400000 and $200000 (most likely zeroes).
Write a minimalist installer that mshrink according to the TPA
That's not really needed in this case, since the program exits right away.

Re: Anyone debug why this crashes ?

Posted: 26 Jan 2021 09:08
by exxos
thorsten.otto wrote: 26 Jan 2021 07:20 You have to add the "#" signs as shown in my example. Otherwise you pass the the values that happen to be found at addresses $400000 and $200000 (most likely zeroes).
OK... But how does the code know if the number is decimal or hex then ? Or does it only accept hex ?

Re: Anyone debug why this crashes ?

Posted: 26 Jan 2021 10:33
by thorsten.otto
The "$" is the hex prefix. Without it, it would be interpreted as decimal. Unlike x86 assemblers, this is not the prefix for constants, so you have to use an additional "#". You can also use a "0x" as hex prefix like in C (at least in PASM or gas, don't know if devpac accepts this, too).

Re: Anyone debug why this crashes ?

Posted: 08 Feb 2021 11:16
by mfro
exxos wrote: 25 Jan 2021 19:43 Been trying to compile MAPROM but I think it uses 030 instructions :( I tried to strip out just the bits I need but its just chucking out errors and I have no idea why :(
Not sure what you really want to achieve. First, you appeared trying to add Alternate RAM, then you want to map ROM?

Btw., no wonder MAPROM doesn't work for you. It's indeed using 68030 PMMU instructions (since it's meant to superimpose RAM for ROM on that architecture using the MMU).

Maybe we'd be able to provide more helpful hints if we'd know more detailed what exactly you want to do?

Re: Anyone debug why this crashes ?

Posted: 08 Feb 2021 11:24
by exxos
mfro wrote: 08 Feb 2021 11:16 Maybe we'd be able to provide more helpful hints if we'd know more detailed what exactly you want to do?
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...

If I just run madalt from GB6, it installs alt-ram, and I can benchmark it, but TOS just doesn't see the alt-ram.. I've looked at how monster does it, maprom, emutos, I cant see me doing anything any different.