16 September 2012, 13:19 | #1 |
Gets there in the end...
Join Date: Sep 2005
Location: Wales
Posts: 862
|
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. |
16 September 2012, 13:46 | #2 |
move.l #$c0ff33,throat
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
|
Since Blitz supports inline ASM you could simply use Exec's AvailMem() function.
|
16 September 2012, 14:38 | #3 |
Gets there in the end...
Join Date: Sep 2005
Location: Wales
Posts: 862
|
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 |
21 September 2012, 14:56 | #4 |
Banned
Join Date: Jul 2010
Location: Australia
Posts: 475
|
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 |
18 September 2019, 20:16 | #5 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
Just wanted to write my own avail function - this works fine.
Note that for just available ram (not total, and not largest(=biggest) you just don't add any constant. So available chipram is just #$2 PS: I looked into EXEC_MEMORY_H and searched for the constant to add for simple "available memory". There is none and that's the point. |
19 September 2019, 00:28 | #6 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
You can also just call ChipFree (or FastFree).
|
22 September 2019, 17:32 | #7 |
Registered User
Join Date: Mar 2018
Location: Austria
Posts: 617
|
Yes thanks!
Found this 2 functions AFTER learning how to use the system calls (which is quite interesting). I didn't find these in the BB2 manual. Is there any documentation to additional commands out there? |
23 September 2019, 03:53 | #8 |
Registered User
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
|
The BUMs added commands continuosly and came with corresponding documentation in Amigaguide and paper format. All BUMs are included on the Ultimate Blitz CD.
Do also note that there are two different Blitz manuals. The later edition is in a ring-bind folder where you could add the BUM addenda. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
2 mb chip ram for A600 | Krisu | Hardware mods | 143 | 25 September 2015 17:33 |
How 2MB chip ram with the Mini Megi Chip? | Antti | support.Hardware | 6 | 04 June 2014 20:54 |
Chip ram sticks ? | droopy | support.Hardware | 5 | 28 July 2013 22:08 |
Chip Ram Bug | ZooL | support.WinUAE | 4 | 09 April 2013 08:14 |
[SAS/C] Making malloc() allocate in fast RAM instead of chip RAM? | 8bitbubsy | Coders. General | 3 | 07 August 2011 07:06 |
|
|