Anyone debug why this crashes ?

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

Moderator: troed

User avatar
exxos
Site Admin
Site Admin
Posts: 15323
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
YouTube: exxosuk
Contact:

Anyone debug why this crashes ?

Post by exxos » Fri Apr 03, 2020 10:39 pm

All it does is run x& = Maddalt&(4194304,2097152) but when the program finishes , it will say program terminated (as expected) but then it bombs... but why ?

FRAM.zip
(11.48 KiB) Downloaded 105 times
EDIT:

As far as I can tell, it crashes on RTS, so I assume its a stack issue..
https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.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 ~

mfro
Posts: 76
Joined: Thu Dec 13, 2018 7:32 am

Re: Anyone debug why this crashes ?

Post by mfro » Sat Apr 04, 2020 8:18 am

Maddalt() adds/hooks memory previously not known into internal GEMDOS memory management.

If it crashes, I would assume the added memory is either not where you told GEMDOS or it was already included in the internal management before (error checking is very simplistic, as I recall).

Other than that, it's impossible to tell without knowledge what you exactly do on what exact hardware and how it was initialised before.
And remember: Beethoven wrote his first symphony in C.

User avatar
exxos
Site Admin
Site Admin
Posts: 15323
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
YouTube: exxosuk
Contact:

Re: Anyone debug why this crashes ?

Post by exxos » Sat Apr 04, 2020 11:22 am

The alt-ram is where its supposed to be, I verified the RAM locations in STOS. So its there. So there shouldn't be any problem in allocating it. But it mostly seems to be when the installer quits, I get 4 bombs.

viewtopic.php?f=73&t=1697&start=270
https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.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 ~

mfro
Posts: 76
Joined: Thu Dec 13, 2018 7:32 am

Re: Anyone debug why this crashes ?

Post by mfro » Sat Apr 04, 2020 12:40 pm

exxos wrote:
Sat Apr 04, 2020 11:22 am
The alt-ram is where its supposed to be, I verified the RAM locations in STOS. So its there. So there shouldn't be any problem in allocating it. But it mostly seems to be when the installer quits, I get 4 bombs.
I would probably start with a specialised RAM test routine to make sure it works reliably?
And remember: Beethoven wrote his first symphony in C.

User avatar
exxos
Site Admin
Site Admin
Posts: 15323
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
YouTube: exxosuk
Contact:

Re: Anyone debug why this crashes ?

Post by exxos » Sat Apr 04, 2020 1:13 pm

mfro wrote:
Sat Apr 04, 2020 12:40 pm
I would probably start with a specialised RAM test routine to make sure it works reliably?
Works fine when I access it from STOS.
https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.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 ~

User avatar
exxos
Site Admin
Site Admin
Posts: 15323
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
YouTube: exxosuk
Contact:

Re: Anyone debug why this crashes ?

Post by exxos » Mon Jan 25, 2021 3:43 pm

Still don't get why it doesn't work..

All I do is x& = Maddalt&(4194304,2097152)

If I run this inside GB6, it installs and lets me run tests, but then bombs when I try and exit the program.. When I just run the line on its own...

IMG_6138.JPG
IMG_6138.JPG (17.63 KiB) Viewed 1015 times

I don't know how to install the FRB cookie, so maybe thats the problem ?
https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.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 ~

User avatar
exxos
Site Admin
Site Admin
Posts: 15323
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
YouTube: exxosuk
Contact:

Re: Anyone debug why this crashes ?

Post by exxos » Mon Jan 25, 2021 5:59 pm

Tried to program this in ASM, it compiles but when I run it, I get 4 BOMBs :(

Code: Select all

	move.l	$200000,d1
	move.l	$400000,d0
	move.l	d1,-(sp)		; Size
	move.l	d0,-(sp)		; Addr
	move.w	#20,-(sp)		; Maddalt
	trap	#1				; GEMDOS
	lea		10(sp),sp
https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.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 ~

mikro
Posts: 242
Joined: Mon Aug 28, 2017 11:22 pm
Location: Kosice, Slovakia
Contact:

Re: Anyone debug why this crashes ?

Post by mikro » Mon Jan 25, 2021 6:07 pm

Well if that was really it, no wonder - you need to correctly terminate it - see https://freemint.github.io/tos.hyp/en/g ... tml#Pterm0. And while you are at it, adding Mshrink() at the beginning wont hurt either ;) - https://freemint.github.io/tos.hyp/en/g ... ml#Mshrink, for usage see: http://tho-otto.de/hypview/hypview.cgi? ... 8&index=35

User avatar
thorsten.otto
Posts: 119
Joined: Mon Nov 04, 2019 2:20 am

Re: Anyone debug why this crashes ?

Post by thorsten.otto » Mon Jan 25, 2021 6:07 pm

That should probably read:

Code: Select all

	move.l	#$200000,d1     ; <--
	move.l	#$400000,d0     ; <--
	move.l	d1,-(sp)             ; Size
	move.l	d0,-(sp)            ; Addr
	move.w	#20,-(sp)           ; Maddalt
	trap	#1				; GEMDOS
	lea		10(sp),sp
	
	clr.w -(sp)
	trap #1

User avatar
exxos
Site Admin
Site Admin
Posts: 15323
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
YouTube: exxosuk
Contact:

Re: Anyone debug why this crashes ?

Post by exxos » Mon Jan 25, 2021 6:12 pm

Thanks..

So this doesn't bomb, but doesn't seem to install alt-ram either :(

Code: Select all

	move.l	$200000,-(sp)		; Size
	move.l	$400000,-(sp)		; Addr
	move.w	#20,-(sp)		; Maddalt
	trap	#1				; GEMDOS
	lea		10(sp),sp

	move.w    #0,-(sp)     ; Offset 0
	trap      #1           ; GEMDOS
	addq.l    #2,sp        ; Correct stack
https://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
https://www.exxoshost.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 ~

Post Reply

Return to “SOFTWARE PROGRAMMING & DISCUSSION”