English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Tutorials

 
 
Thread Tools
Old 21 April 2011, 15:41   #1
jman
Registered User
 
Join Date: Nov 2010
Location: .
Posts: 351
ASM: why "banging the metal"?

Hello,

while I'm waiting for some spare time to start up again the Amiga emulator o_0 I was thinking about the last bit of (huge) help provided by Stingray concerning the startup code needed in order to have something to work reliably while banging the "metal" (btw thanks again to everyone for your ever useful contributions).

When I started fiddling with ASM I said to myself - no custom chip hitting, I'd like to understand how things work without ending up hacking the hardware (I'm think I'm no experienced programmer for such a task). Nonetheless I've found myself doing it that way.

To be honest, manually fiddling with the hardware is *fun*, but back in the day, did really any game developer did it what way?

My question (after this boring stream of conscience): is there an alternate way to program the Amiga in ASM without resorting to manually defined copperlists and strobe register triggering?

Thanks for whoever would like to share his thoughts on this topic and please excuse my naive question in advance.
jman is offline  
Old 21 April 2011, 17:42   #2
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by jman View Post
To be honest, manually fiddling with the hardware is *fun*, but back in the day, did really any game developer did it what way?
Most commercial games shut down the OS and bang the hardware. It's a good way to ensure games work properly on unexpanded machines. It basically used to be the norm.
Quote:
Originally Posted by jman View Post
My question (after this boring stream of conscience): is there an alternate way to program the Amiga in ASM without resorting to manually defined copperlists and strobe register triggering?
Yes, you can use the OS routines to do things such as open a screen. You can then access the screen memory directly for good performance, instead of using the OS graphics routines (do this properly, and it's certainly not hacking of any sorts).

You can take a look at the Rom Kernel Reference Manual here: Amiga Developer Docs

To do this properly, you'll need the right include files. I can upload them to the zone for you if you want.
Thorham is offline  
Old 21 April 2011, 18:44   #3
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
I think shutting down the OS (in a friendly manner) and banging the hardware directly is the best way to ensure your game/demo/whatever runs as expected with no hiccups.

Running software whilst the OS (and other OS based software) is running in the background ensures that not only will your program not always perform as desired, but it will make debugging a nightmare. Sure, it'll work as desired on your machine, but I'd guarantee that others will find ways to break your software. One example is that I have trouble running Octamed 5 on Workbench 2.05, sometimes it runs ok and others it starts to run and then crashes. That's probably the main reason why I haven't composed any music since 2007 (err...I'm no musician, just one 'tune' so far - Jungle Beat, available on Aminet).

There are so many good/bad software out there that you can't ensure your software works as desired without taking over your target Amiga(s).


Regards,
Lonewolf10
Lonewolf10 is offline  
Old 21 April 2011, 20:15   #4
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
For demos it's perhaps good enough to bang the metal, but for games and applications it's not, in my opinion. Writing OS software simply has to be done properly. If some program breaks your properly written code, then it's because the offending program does things it shouldn't. Not at all a reason to sacrifice using the OS.

Using the OS for the basic setup and IO, means you don't have to rely on hacky routines, and this is much preferable. Just try to get proper file system access while the OS has been shut off. You now have to turn it back on again, access the file system and then turn it back off. A huge pain, and a truely crappy way of doing things. Not to mention you can't do anything else with your machine.

It's time people started to forget about banging the metal, and write their software using the OS (not using the crappy graphics routines, of course ).
Thorham is offline  
Old 21 April 2011, 23:34   #5
jman
Registered User
 
Join Date: Nov 2010
Location: .
Posts: 351
Quote:
Originally Posted by Thorham View Post

To do this properly, you'll need the right include files. I can upload them to the zone for you if you want.
Hi Thoram,

thanks for your thoughts.
I'm afraid that what you say hides the fact that many Amiga developers back then weren't able to figure out how to program a real multitasking machine that was too permissive (until the 68010 at least), thus all that conflicting software, thus more people using exclusively the hardware, thus no forward compatibility, thus etc. etc.
This said, squeezing the hardware for that last CPU cycle is a clever way when one may want to overcome the machine's limit. And it's fun.

Now concerning the files, I have the 3.1 sdk. It should contain all that is needed, right? If not, which files are you talking about?

thanks
jman is offline  
Old 22 April 2011, 01:28   #6
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by jman View Post
I'm afraid that what you say hides the fact that many Amiga developers back then weren't able to figure out how to program a real multitasking machine that was too permissive (until the 68010 at least), thus all that conflicting software, thus more people using exclusively the hardware, thus no forward compatibility, thus etc. etc.
Really? When you have the right documentation it's not so difficult.
Quote:
Originally Posted by jman View Post
This said, squeezing the hardware for that last CPU cycle is a clever way when one may want to overcome the machine's limit. And it's fun.
And probably necessary for machines such as the A500 without a faster CPU.
Quote:
Originally Posted by jman View Post
Now concerning the files, I have the 3.1 sdk. It should contain all that is needed, right? If not, which files are you talking about?
If you have that, then there may still be missing LVO includes (missing on purpose ). I've asked about this, and using separate LVO includes is easiest way. They're in the zone, and you can just put the directory in the include directory.
Thorham is offline  
Old 22 April 2011, 09:13   #7
jman
Registered User
 
Join Date: Nov 2010
Location: .
Posts: 351
Quote:
Originally Posted by Thorham View Post
Really? When you have the right documentation it's not so difficult.
And probably necessary for machines such as the A500 without a faster CPU.
If you have that, then there may still be missing LVO includes (missing on purpose ). I've asked about this, and using separate LVO includes is easiest way. They're in the zone, and you can just put the directory in the include directory.
Oh, ok silly me, those files are more or less the same of the "Includes" disk of Devpac I use. Funny how those were distributed by third party publishers rather than C= itself. A quick googling around shows that you had your share of head scratch too (http://goo.gl/aohjg).

Thanks!
jman is offline  
Old 22 April 2011, 11:25   #8
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
Arcade games were primary made in asm with direct hardware access (a game like sidewinder is mostly using the os libraries but use OwnBlitter/DisownBlitter functions prior and after accessing the blitter directly), more ambitious software like simulations or RPGs etc, were made in C with use of system libraries (that's slower than hw access especially on 68000 machines and it can be a bit tricky to understand how the graphics.library works at first but once you made your wrapper functions it's just a breeze).

I find the "Programmers Guide to the Amiga" book by Robert Peck relatively clear & well made regarding the matter of using system libraries to program a game.
hitchhikr is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
"special" chip-mem allocation 68K-ASM Herpes Coders. System 4 13 June 2013 11:42
"Reminder "Lincs Amiga User Group aka "LAG" Meet Sat 5th of January 2013" rockape News 4 30 January 2013 00:06
CD32 Image-Name-Bug: "...(bla)[!].zip" -> "...(bla)[" / "...[test].zip" -> "...[tes" cfTrio support.WinUAE 8 18 December 2012 16:31
Blue Metal Rose "Seedless life" FINALLY OUT - 1 Song free for EAB members viddi Amiga scene 31 28 August 2010 10:40
Blue Metal Rose - the debut album "Spreading the seed" powered by Amiga ! viddi Amiga scene 32 05 November 2009 20:56

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


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

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07885 seconds with 13 queries