pouët.net

Go to bottom

Amiga OCS/ECS demos that work without extra memory (only 512kb chip)

category: offtopic [glöplog]
I suspect he means real fastmem. Every trackmo I've just tried (Desert Dream, Hardwired, etc) required a total of 1 meg, including all those I made myself. Blame the musicians for wanting too much chip ram for samples :P

Quote:
And most of them use horribly bad approaches to detect extra memory (mirror tricks etc.)! :D


Horrible Hacks FTW! :)

Personally I ask the OS what type of memory certain fixed addresses are - if I get a none error response I've found the memory - don't shoot me! :P (I promise to look into doing it properly at some point before my next release, lol)
added on the 2013-04-17 16:30:46 by Paradroid Paradroid
Quote:
Personally I ask the OS what type of memory certain fixed addresses are


That's fine but you certainly can't know all the memory locations of all hardware configs so this approach is bound to fail on certain machines and personally I hate screens like "You don't have any extra memory, lamer!" on a 128 MB A4000. :D

Extra chip is easy to detect, just read Exec's "MaxLocMem" value, if it's > $80000 the machine has 1MB chip. For fast memory I'd just use AvailMem() with MEMF_FAST parameter, if that call succeeds you can be sure there is fast memory in the machine. You can then alloc/align it etc. All this works fine from the bootblock so there really are no dirty hacks needed. :)
added on the 2013-04-17 16:46:07 by StingRay StingRay
There's no such thing as "requiring slowmem" on Amiga. Certainly the Amiga operating system agrees that "slowmem" is fastmem.

It's funny to stumble on this thread and finding 3 coders being confused. I guess you're inexperienced, then. Apparently that's the new deluded derogatory on Pouet XD

Meanwhile, my only reply to the thread remains a perfect shorthand of how to make demo X run on an A500. I must be inexperienced from running hundreds of track-loaded demos and thousands of demos...

It's simply the case that most track-loaded demos don't require any fastmem and in fact, give the traditional guru if such is present. Coders should know it's natural for track-loaded demos to take over the system and use all of the precious chipmem, whereas this is not possible (without disallowing exit) for big demos loaded by the file system.

Maybe it's all just a big misunderstanding and you don't mean to question how to run demos with only 512k chip.
added on the 2022-12-31 00:40:26 by Photon Photon
For new-year demo watching I recommend Vector Exterminator, a relatively late filedemo that requires just 512k. It's so good it can't be watched often enough. (Here, I prepared an ADF for you. :)

Of course you can inadvertently require "slowmem" by placing stuff on fixed addresses starting at $c00000. And then you have some accidental dependency on timing of your code running with exactly the same speed as if it was in chipmem. What can you do if that's the only type of machine you and all your friends have? (Otherworldy voice from the off) "Read the fine documentation!" Fat chance, a better idea would've been to find some rich friends with an A1000/A2000/A3000 for testing.

The "512k chip + 512k any memory" requirement was agreed upon so early that it makes a rock-solid platform foundation, almost as good as the C64. Use sections asking for not more than 450k chipmem, and a maximum of another ~400k of any memory. For the "any" memory, do test against fastmem and (chipmem or slowmem).

As a strategy for detecting memory in trackmos, it was a long journey with an awful lot of testing. Finally I came to scanning the system's memory list in the bootblock (not individual allocations of course, just the headers). First I try to find MEMF_FAST in the attributes. With first occurence of at least $80000 bytes, I save its starting address. When I don't find anything, I probe again for $100000 bytes chipmem and save $80000 as the extmem address. Then I trampoline myself over address $0 to relocate myself to fixed addresses, etc. No OS calls or allocations involved, and you're sure to have access to ALL memory.
added on the 2022-12-31 02:14:39 by bifat bifat
Quote:
trc_wrm: consider it from another viewpoint. The chip ram did not only allow you to store data for your images (think modern graphics card), but also for the other chips, e.g. for sound.


Exactly that.
Especially the sample-based tracker music was quite limited on a 512k configuration.
Some of the best MODs out there, like Space Debris, can run over 300k in size. So that would leave you with less than 200k for graphics and code.
With 1MB you could just get more from the hardware.
Besides, later Amiga's, like the 500+ (1991) and the 600 (1992) were sold with 1 MB as standard anyway.
The 512k was just a cost-cutting matter on the earlier models.

Much like how 640k became the standard for MS-DOS, but earlier PCs were shipped with much less.
added on the 2022-12-31 13:50:29 by Scali Scali

login

Go to top