English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 15 July 2013, 08:43   #1
Oktai-Wanda
 
Posts: n/a
Programming a Simple A500-Compatible Game (Beginner) - Any Advice?

Two issues here:

1. I'd like to write a simple (but perhaps graphically hardware-demanding) Amiga 500-compatible game at some point but I would like to do the programming without any real Amiga 500 hardware. In other words, I would like to do the programming either in Windows or in an emulated Amiga environment (where the host OS is Windows). I would, of course, begin everything by writing some simple scripts and other software for the Amiga 500 because games are demanding and require one to learn a lot of stuff in one go so to speak.

If I intend to do all the programming either on my Windows OS or an emulated Amiga, what kind of IDE, SDK or set of programs should I use? Could Amiga Developer CD 2.1 come in handy? I mean the one sold at least at http://www.vesalia.de/e_developer2.htm

Furthermore, if I follow the usual practice of programming games for the Amiga 500, should I write my stuff in a low-level language or straight in assembler? At least most C64 games were written in assembly for performance reasons if I'm not mistaken -- the game had to work fast enough and interpreters were too slow to be used even though using a more human-understandable programming language would have been tempting. I wonder whether the A500 had the same performance-related problems and whether interpreters have been improved to the extent that games could be written in, say, C or some other widely-used language (although C is sometimes referred to as a low-level language). I would not be surprised to find out that *most* A500-compatible games were written in a very low-level language or directly in assembler. Personally, I prefer high-level languages but if the performance is still an issue, I'm ready to delve deeper into this low-level stuff.

Notice that I would like my game(s) to work on a real Amiga 500 as well. I do not believe in making software that can only be run on emulators as the emulation may not be entirely accurate. Running such games on real hardware could result in an undesirable outcome.


2. I would also like to see if it could be possible to make any changes to existing A500 games and programs. However, AFAIK, this is very demanding without the source code because as far as I have understood, deciphering software that has been decompiled requires serious commitment of time and effort. Is making considerable changes to existing programs without getting hold of the source code even within the realms of possibility when it comes to the A500? Has anyone of you succeeded in doing this?

Maybe A500 games could be decompiled to assembler but figuring out the code and being able to make changes (that actually work) would probably be extremely demanding and time-consuming, not least because I suspect that you don't get any of the explanatory comments that the source code most likely contained. While dealing with these kinds of cases with any platform I would also have to learn the instruction set of every processor and all addresses for every I/O and so on. Unfortunately, I'm a total neophyte at this kind of stuff. Besides, as far as I know, Amiga kernel reference manuals are the size of multi-volume encyclopedias.

I know that hackers and hobbyists used to make minor changes to existing games. For example, they managed to remove the copy protection from several games and they even succeeded in adding trainers with certain modifications like "unlimited lives" and so forth. However, I suspect they did not do this by decompiling anything to assembly but by looking at the memory to see what things change when you, for example, die or get an extra life.
 
Old 15 July 2013, 10:14   #2
Phantom
Adventurer

Phantom's Avatar
 
Join Date: Jun 2009
Location: Colossal Cave, Valaii
Posts: 364
Quote:
Originally Posted by Oktai-Wanda View Post
Two issues here:

1. I'd like to write a simple (but perhaps graphically hardware-demanding) Amiga 500-compatible game at some point but I would like to do the programming without any real Amiga 500 hardware. In other words, I would like to do the programming either in Windows or in an emulated Amiga environment (where the host OS is Windows). I would, of course, begin everything by writing some simple scripts and other software for the Amiga 500 because games are demanding and require one to learn a lot of stuff in one go so to speak.

If I intend to do all the programming either on my Windows OS or an emulated Amiga, what kind of IDE, SDK or set of programs should I use? Could Amiga Developer CD 2.1 come in handy? I mean the one sold at least at http://www.vesalia.de/e_developer2.htm
How you will create a graphically-demanding and beyond Amiga game without programming it under a real Amiga? Programming in Amiga is great fun.

Quote:
Furthermore, if I follow the usual practice of programming games for the Amiga 500, should I write my stuff in a low-level language or straight in assembler? At least most C64 games were written in assembly for performance reasons if I'm not mistaken -- the game had to work fast enough and interpreters were too slow to be used even though using a more human-understandable programming language would have been tempting. I wonder whether the A500 had the same performance-related problems and whether interpreters have been improved to the extent that games could be written in, say, C or some other widely-used language (although C is sometimes referred to as a low-level language). I would not be surprised to find out that *most* A500-compatible games were written in a very low-level language or directly in assembler. Personally, I prefer high-level languages but if the performance is still an issue, I'm ready to delve deeper into this low-level stuff.
68k assembly all the way, thus you can fiddle straight with the Amiga's superior custom chips and you will have total control. Your best friend for this would be definetely the Holy Bible (aka Amiga Hardware Reference Manual).

In case that you haven't program in assembly before, don't be scared, it's not very difficult. Since you get the grips with it, it's really fun.

Quote:
Notice that I would like my game(s) to work on a real Amiga 500 as well. I do not believe in making software that can only be run on emulators as the emulation may not be entirely accurate. Running such games on real hardware could result in an undesirable outcome.
A real Amiga 500 then will be your best friend.

Quote:
Maybe A500 games could be decompiled to assembler but figuring out the code and being able to make changes (that actually work) would probably be extremely demanding and time-consuming, not least because I suspect that you don't get any of the explanatory comments that the source code most likely contained. While dealing with these kinds of cases with any platform I would also have to learn the instruction set of every processor and all addresses for every I/O and so on. Unfortunately, I'm a total neophyte at this kind of stuff. Besides, as far as I know, Amiga kernel reference manuals are the size of multi-volume encyclopedias.
You can't just disassemble a code and start changing this in random without knowing what you're doing. Even the slightest change can transform your listing into a mess, and of course into non-running code.
Phantom is offline  
Old 15 July 2013, 10:31   #3
TCD
Registered User

TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 42
Posts: 24,012
Quote:
Originally Posted by Oktai-Wanda View Post
should I write my stuff in a low-level language or straight in assembler?
Which other low-level language would you use?
TCD is offline  
Old 15 July 2013, 16:22   #4
xArtx
Registered User
 
Join Date: Jun 2013
Location: Australia
Posts: 679
This is a setup
xArtx is offline  
Old 15 July 2013, 22:46   #5
phx
Natteravn

phx's Avatar
 
Join Date: Nov 2009
Location: Herford / Germany
Posts: 1,647
Quote:
Originally Posted by Oktai-Wanda View Post
1. I'd like to write a simple (but perhaps graphically hardware-demanding) Amiga 500-compatible game at some point but I would like to do the programming without any real Amiga 500 hardware. In other words, I would like to do the programming either in Windows or in an emulated Amiga environment (where the host OS is Windows).
Cross development for the Amiga under Windows as a host OS is possible. Portable C compilers, like gcc or vbcc, can be configured as a cross compiler for host=Windows and target=AmigaOS.

For a portable, Devpac-compatible, assembler see here: http://sun.hasenbraten.de/vasm/


Quote:
Furthermore, if I follow the usual practice of programming games for the Amiga 500, should I write my stuff in a low-level language or straight in assembler?
Depends on the type of game. A fast action game definitely requires you to write it in assembler and to program the custom chip hardware directly. You will only need an assembler and the Hardware Reference Manual in this case.

An adventure, or similar games, could also be written in C or Basic or whatever you like. But also keep in mind that high level languages tend to consume much more memory, which is limited on a stock A500.


Quote:
Notice that I would like my game(s) to work on a real Amiga 500 as well.
You will absolutely need a real Amiga 500 then.
You may find a friendly person to test your game on real hardware, but when you have to debug it, then it is best to own the hardware.

I'm in the same situation. I wrote Sqrxz and Sqrxz2 for Amiga500 with a cross-assembler and UAE on my Pegasos2. But testing it at least once every day on real hardware was mandatory.

Currently I'm writing a new Jump'n'Run (Solid Gold).


Quote:
2. I would also like to see if it could be possible to make any changes to existing A500 games and programs.
You can either patch the code directly with a monitor program (or an assembler IDE, like AsmOne) or disassemble it with a reassembler.

Only the reassembler will allow you to make bigger changes in a comfortable way, but in both cases you have to invest a lot of time to understand the 68000 code of the game.

This will be extremely frustrating when the original source was not in assembler, but in a high level language, like C.
phx is offline  
Old 17 July 2013, 10:38   #6
zharn
Registered User
 
Join Date: Nov 2012
Location: Brisbane Australia
Posts: 150
So whats a good colour IDE for c? besides using ed....

Speed wont be my problem but a nice editor will help.
zharn is offline  
Old 17 July 2013, 11:05   #7
Zetr0
Ya' like it Retr0?
Zetr0's Avatar
 
Join Date: Jul 2005
Location: United Kingdom
Age: 45
Posts: 9,768
For Amiga programming in 2013 here is my suggestion

WinUAE + ClassicWB + GadTool + Storm C++ V3.0 or higher


This will get you in the door - opening graphics windows, learning disk routines for loading / saving of data.

While C/C++ are high level languages - in time, when you are confident, you can compile to assembly (as opposed to object code) and then optimize the assembly before continuing to compile to object code and then linking onto executable code.

The thing with ASM - while very VERY powerful it can lead to some problems, its very easy to learn, but will take years to master and most notably system dependencies that may not be on every Amiga platform thus breaking compatibility

This is something you need to consider before you plum for this approach.


IMHO, get to grips with C/C++ and the Amiga DOS environment, and then move onto ASM to tighten and speed up critical routines. When coding on the Amiga this is what I do, irony is at the moment I am coding on the 8bit spectrum, and I write my ASM into C routine wrappers as it really speeds up development (as opposed to writing native Z80 ASM)

I would suggest to choose a very simple first project (like a maze / dungeon crawler) - dont worry about enemies, just get maze-map to image translations, learn double buffering and some of the eccentricities of how the Planar Graphics on the Amiga works. You will need to learn a bit on how AmigaDOS works as well as loading / saving - including file types like IFF / TIF and BMP and with some of these you will learn encoding - namely RLE (Run Length Encoding) which is still used a lot today!

This will be more than enough to keep you busy for the next few months. Then move onto more stuff like adding enemies to catch you. with just these very few components your program will become VERY big very quickly.

Last edited by Zetr0; 17 July 2013 at 11:21.
Zetr0 is offline  
Old 17 July 2013, 11:17   #8
Zetr0
Ya' like it Retr0?
Zetr0's Avatar
 
Join Date: Jul 2005
Location: United Kingdom
Age: 45
Posts: 9,768
Quote:
Originally Posted by zharn View Post
So whats a good colour IDE for c? besides using ed....

Speed wont be my problem but a nice editor will help.

When I used to use DICE I would write my files up in ed, I then realized the insantity I had been putting myself under and wrote my own editor that highlighted C keywords / symbols, I then moved up to GoldED. eventually I bit the bullet and bought Storm C++ V3.0 (over £100 back in the day) and was playing with Warp 3d on my 060 and Cybersvision equipped Amiga...


Good times..... Good times...
Zetr0 is offline  
Old 17 July 2013, 11:30   #9
zharn
Registered User
 
Join Date: Nov 2012
Location: Brisbane Australia
Posts: 150
whats the story on golded? you need a key, was it ever released to be free
zharn is offline  
Old 17 July 2013, 14:41   #10
Zetr0
Ya' like it Retr0?
Zetr0's Avatar
 
Join Date: Jul 2005
Location: United Kingdom
Age: 45
Posts: 9,768
I think it was released, perhaps our fellow forum chummy gulliver would know more - he has done quite a bit for the community with contacting original authors of software and connecting them back to the community.
Zetr0 is offline  
Old 17 July 2013, 17:18   #11
gimbal
cheeky scoundrel

gimbal's Avatar
 
Join Date: Nov 2004
Location: Spijkenisse/Netherlands
Age: 38
Posts: 3,612
Quote:
Originally Posted by Zetr0 View Post
irony is at the moment I am coding on the 8bit spectrum, and I write my ASM into C routine wrappers as it really speeds up development (as opposed to writing native Z80 ASM)
You invented a time machine, didn't you? You've gone back to the golden days of (game) programming.
gimbal is offline  
Old 28 July 2013, 00:26   #12
Oktai-Wanda
 
Posts: n/a
Thanks for the replies!

I decided to purchase the Amiga Developer CD but I haven't received it yet. Anyway, considering your replies, there seems to be no "definite, sure-fire way" to successfully do the programming but lots of different opinions. I'll have to see which one of the approaches suits me best (but suffice it to say that this project is going to take a helluva lot of time regardless of the approach).

Quote:
You will absolutely need a real Amiga 500 then.
I'll buy an A500 from a friend of mine. It's an older model though (presumably OCS) because the early versions of Double Dragon II can be played on it unlike the A500 that I used in the early 90's (ECS I guess).

As far as the simplicity of the game is concerned, expect something similar to some of the games in the 50 Great Games collection by Wicked Software (or the infamous Action 52 on the NES) except with better graphics. That's demanding enough for me. It won't be another paper-and-pencil or card game though.
 
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
I need advice on compatible hardware for my A500 Ilyad support.Hardware 1 28 May 2012 23:00
Compatible PC floppy drive for A500 case? hoptoit support.Hardware 5 17 October 2010 23:16
Beginner needs advice on next upgrade step Bishmanrock support.Hardware 27 14 October 2010 10:23
Project: Making A600 as A500-compatible as possible 8bitbubsy support.Hardware 6 29 June 2010 08:23
Are these memory chips compatible with a500? ssr Hardware mods 10 31 December 2008 21:49

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 19:05.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Page generated in 0.08657 seconds with 15 queries