Installing alt-ram assembly problem

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

Moderator: troed

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

Installing alt-ram assembly problem

Post by exxos »

I saw in monster it has..

Code: Select all

maddalt:
	move.l	d1,-(sp)		; Size
	move.l	d0,-(sp)		; Addr
	move.w	#20,-(sp)		; Maddalt
	trap	#1			; GEMDOS
	lea		10(sp),sp
	rts

In toshyp it has..

Code: Select all

move.l    size,-(sp)   ; Offset 6
pea       start        ; Offset 2
move.w    #20,-(sp)    ; Offset 0
trap      #1           ; GEMDOS
lea       $A(sp),sp    ; Correct stack

I have tried both but with no luck... I have...

Code: Select all

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

In hisoft I can call

Code: Select all

x = Maddalt&(4194304,2097152)
and it does declare the RAM.. But I end up with 2 bombs on GB6 exit. I think its not correcting the stack or something.. So was trying to do it in asm instead, but can't get it working at all.. anyone any idea why ?
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.
User avatar
exxos
Site Admin
Site Admin
Posts: 23493
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Installing alt-ram assembly problem

Post by exxos »

I just noticed this on the source code..
1.JPG
1.JPG (10.29 KiB) Viewed 5797 times
:lol:


So now I am getting two bombs, sso I guess that is progress it least :lol:


EDIT: Oh it seems to be working with #$ on the numbers now.. so looks like problem solved, just needs testing outside of Hatari now :)

EDIT2: odd second time I checked alt-ram speed it crashed :lol: :roll:
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.
User avatar
exxos
Site Admin
Site Admin
Posts: 23493
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Installing alt-ram assembly problem

Post by exxos »

Something is still amiss somewhere :roll:

I hooked up my monster, and using the monster driver, GB6 benchmarks the RAM fine, and takes about 76 seconds...

Now when using the hisoft maddalt, or asm maddalt... They both act the same that when the benchmark is started, it does not report fast ram not found, and it attempts to do the test, but it seems to fail as it just goes back to the main window... If I tried a second time I just get 2 bombs..

So something is wrong with how the RAM is being declared :shrug:
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.
User avatar
exxos
Site Admin
Site Admin
Posts: 23493
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Installing alt-ram assembly problem

Post by exxos »

Interesting..

Code: Select all

	move.l	$4000,-(sp)	; Size
	move.l	$4000,-(sp)	; Addr
and it didn't crash and now shows 0% score as expected... I mean WTF, is this declared in KB not BYTES ?!
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: Installing alt-ram assembly problem

Post by czietz »

Without really understand what you're trying to achieve in the first place, I notice the following things:

- No Maddalt does not take its arguments in kilobytes. (And $4000 wouldn't be 4000 kilobytes, anyway.)
- You're again missing the "#". MOVE.L $4000,D0 does not move the number $4000 into D0, it moves whatever value happens to be at memory address $4000 into D0.
- When using the MonSTer driver, you are not supposed to call Maddalt, the driver will do that for you. When not using the MonSTer driver, you cannot add the MonSTer's alt-RAM to TOS by simply calling Maddalt, either. You have to activate the memory on the MonSTer first. This is how it's done: https://github.com/emutos/emutos/blob/0 ... ry2.c#L139
User avatar
exxos
Site Admin
Site Admin
Posts: 23493
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Installing alt-ram assembly problem

Post by exxos »

I took out the # as devpack docs said it was floating point stuff so I stopped using it..

I was wondering if the value couldn't be loaded into SP directly.. but can I load the values into data registers and then load form say d0 to SP instead ?

EDIT:

This might be easier to setup in the GB6 code in basic now I know its looking at RAM locations not taking numbers, easy to try....

EDIT2: Nope didn't like that..

So need to know how to get the numbers to the SP then in ASM
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: Installing alt-ram assembly problem

Post by czietz »

I still don't understand what you want to do.
I took out the # as devpack docs said it was floating point stuff so I stopped using it..
This has nothing to do with floating point. In 68k assembler syntax, a "#" simply denotes an immediate value. For sure, there must be good 68k ASM tutorials out there. The Devpac manual assumes you already know 68k assembler.
So need to know how to get the numbers to the SP then in ASM
You already have an example for that in your code above:
MOVE.W #20, -(SP)
pushes the word (16 bit) 20 to the stack. Correspondingly,
MOVE.L #$400000, -(SP)
pushes the long (32 bit) $400000 to the stack.
User avatar
exxos
Site Admin
Site Admin
Posts: 23493
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Installing alt-ram assembly problem

Post by exxos »

I'm just trying to declare alt-ram thats all. Basically 2MB at 4MB location..

I had MOVE.L #$400000, -(SP) originally, but I keep getting crashes in GB6... Monster alt-ram driver works (and yes I keep saying driver when its not) and it works in GB6.. So my ASM must be wrong somewhere as its not working like monster driver does. So I am trying to figure out why GB6 crashes when I declare alt-ram in my ASM code.
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: Installing alt-ram assembly problem

Post by czietz »

Like I said above: If you're not running the Monster alt-RAM "driver", you cannot simply use Maddalt. You have to do what the driver does: enable Monster alt-RAM first.
User avatar
exxos
Site Admin
Site Admin
Posts: 23493
Joined: Wed Aug 16, 2017 11:19 pm
Location: UK
Contact:

Re: Installing alt-ram assembly problem

Post by exxos »

czietz wrote: Thu Jun 20, 2019 8:41 pm Like I said above: If you're not running the Monster alt-RAM "driver", you cannot simply use Maddalt. You have to do what the driver does: enable Monster alt-RAM first.
hmm ok, so more work is needed for monster then... don't get it.. but mostly I am doing this in Hatari anyway. So using maddalt should declare the RAM in Hatari ?
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”