When asked if there is a guide to porting AGD to a new system, this was Kees van Oss's response on facebook:
Not really ... but this is how MPAGD works and what needs to be done to port it:
1. You start with an ASCII AGD file with commands to define graphics and the game behaviour. This AGD file can be created by converting an existing AGD4.7 game or create one with AGDX Studio or Jonathan Cauldwells WinAGD program.
2. The next step is to compile this ASCII AGD file into an assembler source file. The compiler converts all ASCII AGD commands into assembler code and adds the engine to the assembler sourcefile.
The engine is a library with routines which are called by the assembler code linked to the AGD commands.
3. After compiling, you need to assemble the assembler file into a binary file ready to run on the designed system. This assembler creates a tape or diskfile which can be used by the emulator.
4. After creating the tape or disk files, an emulator is called with the created tape or diskfile to test the game. So what needs to be changed to port MPAGD are:
- The converter, a C program (Step 1)
- The compiler, a C program (Step 2)
- The engine, a Z80 assembler file (Step 2)
You can use an existing assembler and emulator program to complete steps 3 and 4.
Things that need to be defined for a platform are:
- memory map definition
- screen handling
- sound handling
- keyboard handling
All blocks, sprites and objects are software handled by peeking and poking into screen memory so there is no hardware sprite handling except the MSX port which handles hardware sprites. The screen is based upon the ZX Spectrum, 256x192 pixels. The Spectrum has 16 colours with the limitation of a 8x8 block with 2 colours
- Blocks (tiles) are 8x8 pixels, max 255
- Sprites are 16x16 pixels, max 12
- Objects are 16x16 pixels, max 255
All these specs can be changed but all AGD4.7 games are based upon these specs.
Are you planning to port MPAGD to another platform because we have a Developers environment where you can discuss your porting problems.
Not really ... but this is how MPAGD works and what needs to be done to port it:
1. You start with an ASCII AGD file with commands to define graphics and the game behaviour. This AGD file can be created by converting an existing AGD4.7 game or create one with AGDX Studio or Jonathan Cauldwells WinAGD program.
2. The next step is to compile this ASCII AGD file into an assembler source file. The compiler converts all ASCII AGD commands into assembler code and adds the engine to the assembler sourcefile.
The engine is a library with routines which are called by the assembler code linked to the AGD commands.
3. After compiling, you need to assemble the assembler file into a binary file ready to run on the designed system. This assembler creates a tape or diskfile which can be used by the emulator.
4. After creating the tape or disk files, an emulator is called with the created tape or diskfile to test the game. So what needs to be changed to port MPAGD are:
- The converter, a C program (Step 1)
- The compiler, a C program (Step 2)
- The engine, a Z80 assembler file (Step 2)
You can use an existing assembler and emulator program to complete steps 3 and 4.
Things that need to be defined for a platform are:
- memory map definition
- screen handling
- sound handling
- keyboard handling
All blocks, sprites and objects are software handled by peeking and poking into screen memory so there is no hardware sprite handling except the MSX port which handles hardware sprites. The screen is based upon the ZX Spectrum, 256x192 pixels. The Spectrum has 16 colours with the limitation of a 8x8 block with 2 colours
- Blocks (tiles) are 8x8 pixels, max 255
- Sprites are 16x16 pixels, max 12
- Objects are 16x16 pixels, max 255
All these specs can be changed but all AGD4.7 games are based upon these specs.
Are you planning to port MPAGD to another platform because we have a Developers environment where you can discuss your porting problems.
I'm working on the engine mentioned in #2.
ReplyDeleteThe AGD facebook group
ReplyDeletehttps://www.facebook.com/groups/393450344579928/?ref=group_header