English Amiga Board    


Go Back   English Amiga Board > » Coders > Coders. Language

Reply
 
Thread Tools
Old 16 September 2012, 13:19   #1
Coagulus
Zone Friend
 
Coagulus's Avatar
 
Join Date: Sep 2005
Location: Wales
Posts: 468
Show free chip ram in Blitz2?

Hi all,

Hope this is the right place.

Is there a way in Blitz 2 to report the available chip ram? I would like it conditional that I load the music if there's enough memory.

Cheers.
Coagulus is offline   Reply With Quote
Old 16 September 2012, 13:46   #2
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 4,547
Since Blitz supports inline ASM you could simply use Exec's AvailMem() function.
__________________
Makes me sick when I hear all the shit that you say
So much crap coming out, it must take you all day
There's a space kept in hell with your name on the seat
With a spike in the chair just to make it complete
StingRay is offline   Reply With Quote
Old 16 September 2012, 14:38   #3
Coagulus
Zone Friend
 
Coagulus's Avatar
 
Join Date: Sep 2005
Location: Wales
Posts: 468
Cheers stingray, I tried

_availmem
putreg d0,a
print a

it shows a figure but I can't seem to pass any attributes to availmem to report Chip ram.

[edit] ah, the underscore goes at the end! a=availmem_(requirements)

[edit2] a.l=AvailMem_(2) seems to do the trick in Blitz...

[edit3] found on aminet that a.l=AvailMem_($20002) is the same as a.l=ChipFree

Last edited by Coagulus; 16 September 2012 at 20:25. Reason: got it wrong! and more info
Coagulus is offline   Reply With Quote
Old 21 September 2012, 14:56   #4
fishyfish
Registered User
 
Join Date: Jul 2010
Location: Australia
Posts: 445
Ah, cool, that cleared up something for me too.
I'd just recently found a variation on this:

#any=0
#chip=2
#fast=4
#biggest=$20000
#total=$80000

nprint "ChipRAM: ",AvailMem_(#chip|#total)

I partway knew what was going on, but this filled in the blanks for me
fishyfish is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2 mb chip ram for A600 Krisu Hardware mods 138 24 April 2013 11:18
[SAS/C] Making malloc() allocate in fast RAM instead of chip RAM? 8bitbubsy Coders. General 3 07 August 2011 07:06
How 2MB chip ram with the Mini Megi Chip? Antti support.Hardware 5 29 April 2010 18:30
not enough chip ram a500? skforty support.Hardware 33 07 August 2009 22:53
my 3mb chip ram webhead support.Hardware 15 06 September 2007 21:56


All times are GMT +2. The time now is 19:11.

-->

Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Page generated in 0.24191 seconds with 11 queries