You will not be able to post if you are still using Microsoft email addresses such as Hotmail etc
See here for more information viewtopic.php?f=20&t=7296
BOOKMARK THIS PAGE !
https://www.exxosforum.co.uk:8085/IP_CHECK/
You can unban yourself if needed. It also sends me reports to investigate the ban.
DO NOT USE MOBILE / CGNAT DEVICES WHERE THE IP CHANGES CONSTANTLY!
At this time, it is unfortunately not possible to whitelist users when your IP changes constantly.
You may inadvertently get banned because a previous attack may have used the IP you are now on.
So I suggest people only use fixed IP address devices until I can think of a solution for this problem!

Installing alt-ram assembly problem

News,announcements,programming,fixes,game patches & discussions.
User avatar
exxos
Site Admin
Site Admin
Posts: 27948
Joined: 16 Aug 2017 23:19
Location: UK

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 ?
User avatar
exxos
Site Admin
Site Admin
Posts: 27948
Joined: 16 Aug 2017 23:19
Location: UK

Re: Installing alt-ram assembly problem

Post by exxos »

I just noticed this on the source code..
1.JPG
: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:
You do not have the required permissions to view the files attached to this post.
User avatar
exxos
Site Admin
Site Admin
Posts: 27948
Joined: 16 Aug 2017 23:19
Location: UK

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:
User avatar
exxos
Site Admin
Site Admin
Posts: 27948
Joined: 16 Aug 2017 23:19
Location: UK

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 ?!
czietz
Posts: 578
Joined: 14 Jan 2018 13:02

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: 27948
Joined: 16 Aug 2017 23:19
Location: UK

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
czietz
Posts: 578
Joined: 14 Jan 2018 13:02

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: 27948
Joined: 16 Aug 2017 23:19
Location: UK

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.
czietz
Posts: 578
Joined: 14 Jan 2018 13:02

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: 27948
Joined: 16 Aug 2017 23:19
Location: UK

Re: Installing alt-ram assembly problem

Post by exxos »

czietz wrote: 20 Jun 2019 20:41 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 ?

Return to “SOFTWARE PROGRAMMING & DISCUSSION”

Who is online

Users browsing this forum: CCBot and 0 guests