Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Question about memory  (Read 2966 times)

0 Members and 1 Guest are viewing this topic.

rednova

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 225
    • http://www.feryogi.com
Question about memory
« on: July 11, 2014, 06:22:09 PM »

Dear Friends:
I am about to start coding a new amos game on original amiga 2000.
I just realized (which I did not know before) that my last amos game was coded on an amiga 1200
with 16 mb ram. My only system I have now is amiga 2000 with 1mb chip and 2 mb ram.
So I just realized I only have 2 mb ram for my amiga game.
I want to make a game that can be installed in the hard drive.
The game will include an executable file for the main game and a collection of pics to be loaded
one at a time from the HD.
If the main file is less than 2 mb, will the game run good on amiga 2000 ?
I never had this trouble before, as I used to code on 16 mb ram.
Please help me with this memory issue.
Thank you !!!
Logged
-mobilis in mobile-

bruceuncle

  • AMOS Dev
  • A500
  • *****
  • Karma: 6
  • Offline Offline
  • Gender: Male
  • Posts: 425
  • WINUAE Amiga User
Re: Question about memory
« Reply #1 on: July 12, 2014, 09:23:31 AM »

Hey, that's the setup I had when I owned a real Amiga all those years ago.  I remember buying a Fat Agnus and installing it.  Can't remember whether that took it from 1Mb to 2Mb Chip, or 512Kb to 1Mb Chip.  Anyway, you'd be having to write one heck of a large game to use up the memory.  If you've got some really big Chip RAM requirements (graphics, samples) load them as banks and erase immediately after use.  In other words, all the cunning stuff AMOS programmers have done for years  ;) .

The 2 Mb Fast RAM should be fine.  The largest AMOS program I've written so far (the DBL Editor) was only 245Kb with the comments left in.  Or 196Kb with just the code.  That's 7,855 lines of code with comments or 5,829 without.  That's a large program.  On that basis, you'd probably be able to stretch to around 45,000 lines of code depending on what you've got running alongside AMOS and what Fast RAM banks you're cooking with.  At those sort of sizes you'd be more likely to run into string garbage collection problems and, possibly, the 16Kb limit on branches within AMOS (it only uses 16 bits to hold the target offsets for loops and conditionals).  Memory fragmentation might also rear its ugly head if you're allocating and de-allocating banks a lot.  Be sure to allocate your largest chunks of memory early in your code (assuming they're permanent for the duration of the program).

Your main problem will be speed.  With the compiler still shaky (I won't be looking at it until everything else is fixed) you'll find the A2000 a bit slow.

If I were in your position, I'd just go ahead and start coding.  Keep an eye on memory and only take cunning memory-conservation action if you really need to.

Best of luck with it.  I love coding in AMOS (and the Amiga generally) after all these years.  Refreshing is the word I think  :) .  Currently having great fun with the AMOS Installer as the next bug-fix release will have to be driven by a program.  Too much to change to just make it a 'replace these files' release as it involves the config files as well.  I wanted to keep the original intro but add something at the end to indicate the nature of the upgrade (bugfixes and docs).  There's some massive Bobs hidden in the banks used (created on-the-fly from a Data bank) and, although there's obviously a lot of effort went into keeping it small and snappy, those Bobs were never removed (they're not actually  used anywhere).  It still all works fine even though it could be around 75Kb smaller.  So even the professionals were probably over-cautious with memory way back then  ;)
Logged
Repeat after me ...  "The AMOS Pro architecture is complex but it is not complicated."
Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022