Jump to content

Photo

Arcade Game Designer (AGD) for the Coco


9 replies to this topic

#1 oss003 OFFLINE  

oss003

    Combat Commando

  • 5 posts

Posted Sun Jun 24, 2018 12:53 PM

Hi guys,
 
I'm new to the forum but want to explain a bit about AGD because I ported AGD to the Acorn Atom.
The Acorn Atom has the same video processor as the Dragon and Coco, the 6847 but in fact AGD can also be ported to other Tandy machines. 
 
Jonathan Cauldwell has written a program called Arcade Game Designer for the ZX Spectrum. It's a game creation program with build-in editors. You can define a font, objects, sprites, blocks, screens and add event based script commands describing how the game runs. You can start the game from the menu for testing. The program is written for a ZX Spectrum 48/128KB. It's a nice program with a good engine and a lot of games are written with AGD. If the game is ready, you can save it in a tapefile as stand alone game which runs without the editors. AGD can be downloade here: https://jonathan-cau...e-game-designer
 
Jonathan has also written an editorless compiler running in Windows. This compiler needs 2 files to generate a game: a game engine and a script file. The script file is compiled to an assembler file and merged with the game engine file. A Z80 assembler source file is generated which can be compiled to Z80 code. This is very interesting for porting AGD to the Atom because if I can convert the game engine to Atomic 6502 code and change the compiler to generate 6502 assembler from the script file, you have an assembler file which can be compiled to 6502 code.
 
The big advantage is that the engine file is system dependent but the game itself, written as a script file, can be easily ported.
So the AGD system consists of:
 
- an general game engine file with routines to manage the game
- a game specific script file with font-, objects-, sprites-, blocks- and screen data and commands describing the game
 
The engine file can't be 100% compatible with all ported systems due to resolution-, colour- and memory differences. The script commands however can be 100% compatible so this means to run a game, you have to change the data and compile it for your system.
 
For now I have a working Acorn Atom port with more than 50 games working. You can see some examples here:
 
ZX Spectrum version Terrapins:
Atom version Terrapins:
 
ZX Spectrum version Dodgy:
Atom version Dodgy:
 
A lot of tests of games: https://www.youtube....user/oss003/vid... subscriber
 
There are about 150 games written in AGD ready to be ported: https://spectrumcomp...g.co.uk/index.p... 6&id=20176
 
At the moment Tony Tompson is writing an AGDX suite in which you can design your tiles, objects, sprites and screens.
You can also write the game scripts and the goal is to compile the game to different systems.
For now a ZX Spectrum, CPC and Acorn Atom port are available and more to come, eg. BBC and Atari.
So if a Dragon/Coco port is available, a whole lot of new games are available.
 
What has to be done to port AGD:
- Write a Dragon based engine
- Change the script compiler to produce 6809 assembler.
 
If anyone is interested in helping to create a Coco port, please contact me because there's an AGD group where the AGDX Studio is developed and technical questions can be answered. I must say that it was fun to create an Atom port and the result is a lot of new games.
 
Greetings
Kees

Edited by oss003, Sun Jun 24, 2018 12:56 PM.


#2 jhd OFFLINE  

jhd

    Stargunner

  • 1,752 posts
  • Location:Calgary, Alberta, Canada

Posted Fri Jun 29, 2018 11:51 AM

This looks like an interesting project, but does the Coco have the capacity to run this?

 

It has been a long time since I wrote any code for the Coco, but my impression was that the only way to get any kind of decent speed was hand-coded, optimized assembly language. AGD seems much like coding in a high-level language. It is certainly much easier to program, but the trade-off is the lack of speed. This is ok for some applications, but not games. Recall that the 6809 in the Coco runs at < 1 Mhz. 

 

You might considering targeting the Coco 3 instead as that has more powerful hardware, while the video chip is still mostly compatible with the 6847.



#3 jmdlcar OFFLINE  

jmdlcar

    Space Invader

  • 12 posts
  • Location:Ohio

Posted Fri Jun 29, 2018 12:19 PM

If it all about speed and graphics then you better stay with a PC and pay Microsoft. Then you can do what you want. That Computer was made 30 to 35 years ago and at that time PC wasn't much better.



#4 oss003 OFFLINE  

oss003

    Combat Commando

  • Topic Starter
  • 5 posts

Posted Mon Jul 2, 2018 2:58 AM

This looks like an interesting project, but does the Coco have the capacity to run this?

 

It has been a long time since I wrote any code for the Coco, but my impression was that the only way to get any kind of decent speed was hand-coded, optimized assembly language. AGD seems much like coding in a high-level language. It is certainly much easier to program, but the trade-off is the lack of speed. This is ok for some applications, but not games. Recall that the 6809 in the Coco runs at < 1 Mhz. 

 

You might considering targeting the Coco 3 instead as that has more powerful hardware, while the video chip is still mostly compatible with the 6847.

AGD is written for a ZX Spectrum 128KB and not for a PC.
The games created with AGD will run on a 48KB ZX Spectrum or a 128KB Spectrum if you want extra music.
The editorless version of AGD is written on a PC but the created game output is the same code as the original AGD version.

So the editorless version of AGD is just a tool for easy editing graphic data and creating standard Z80 code.

About the speed ..... I converted AGD for the Acorn Atom which has a 1MHz 6502. 
Most of the games play well but if there are a lot of sprites on the screen or the code behind the sprites is complex, the speed is reduced.

I think the 6809 is faster than a 6502 because it has 16 bit registers which are very powerfull and most of the graphic routines use 16 bit addresses for data handling.

The game engine, which is the hart of all AGD games, must be optimized for speed and the best way to do this is manually coding.

 

Memory could be critical, I don't know how much RAM is available for assembly in a standard Coco but my Atom has 32KB (excl. video RAM) and can run about 90% of the games.

The 64KB version should have enough free RAM to run the AGD games because the Spectrum only has 48KB.

 

Greetings

Kees


Edited by oss003, Mon Jul 2, 2018 3:01 AM.


#5 JamesD OFFLINE  

JamesD

    Quadrunner

  • 8,224 posts
  • Location:Flyover State

Posted Mon Jul 2, 2018 11:29 AM

AGD is written for a ZX Spectrum 128KB and not for a PC.
The games created with AGD will run on a 48KB ZX Spectrum or a 128KB Spectrum if you want extra music.
The editorless version of AGD is written on a PC but the created game output is the same code as the original AGD version.

So the editorless version of AGD is just a tool for easy editing graphic data and creating standard Z80 code.

About the speed ..... I converted AGD for the Acorn Atom which has a 1MHz 6502. 
Most of the games play well but if there are a lot of sprites on the screen or the code behind the sprites is complex, the speed is reduced.

I think the 6809 is faster than a 6502 because it has 16 bit registers which are very powerfull and most of the graphic routines use 16 bit addresses for data handling.

The game engine, which is the hart of all AGD games, must be optimized for speed and the best way to do this is manually coding.

 

Memory could be critical, I don't know how much RAM is available for assembly in a standard Coco but my Atom has 32KB (excl. video RAM) and can run about 90% of the games.

The 64KB version should have enough free RAM to run the AGD games because the Spectrum only has 48KB.

 

Greetings

Kees

The 6809 isn't always faster, but I'd say it's usually faster unless there's some massive loop unrolling.
The 6809 certainly doesn't require the programmer to jump through as many hoops to get the most efficient code, and the code can be smaller by 30% or more.
If Motorola had included an instruction prefetch, it wouldn't even be contest.  The 6309 runs 6809 code at least 20% faster when in native mode, and much of that is due to the prefetch.

Even the 6803 in the MC-10 is very competitive with the 6502. 

After a few optimizations, Microsoft BASIC is faster on the .89 Mhz MC-10 than on 1Mhz 6502 machines, and multiply intensive code is significantly faster 
16 bit support can make a big difference and Microsoft didn't take advantage of that or the hardware multiply.
The code for the CoCo and MC-10 is largely the same as Microsoft's 6800 version.
The 64 column graphics text code I wrote is faster on an MC-10 than on an Atari even with the big difference in clock speed.
That's largely due to the 16 bit scrolling.  Large memory moves are not something the 6502 excels at. 
The 65816 version is definitely faster than the MC-10 though.  That just switches to moving 16 bits at a time. 
Surprisingly, the 65816 memory move instruction isn't much faster than the 8 bit 6502 code, and the unrolled loop is actually faster.
FWIW, I spent less time optimizing the 6803 code than the 6502 or Z80 versions.  the Z80 code underwent the most revisions by a wide margin. 
 


Edited by JamesD, Mon Jul 2, 2018 11:41 AM.


#6 oss003 OFFLINE  

oss003

    Combat Commando

  • Topic Starter
  • 5 posts

Posted Tue Jul 3, 2018 11:47 AM

Hi guys,

 

  on the Dragon forum, Pere Serrat is converting an AGD game called Foggy. 

His demo is running on a Dragon and Coco so if he manages to write a Dragon engine, it can easily be converted to a Coco engine.

 

http://archive.world...t=1154&start=30

 

Greetings

Kees

 

Attached File  FoggyCoCo.png   226.23KB   1 downloads

 


Edited by oss003, Tue Jul 3, 2018 11:53 AM.


#7 thanatos OFFLINE  

thanatos

    Stargunner

  • 1,669 posts
  • Location:State of Confusion

Posted Tue Jul 3, 2018 9:15 PM

You might want to post this to the CoCo mailing list:  https://pairlist5.pa...n/listinfo/coco

 

There will probably be people interested!



#8 oss003 OFFLINE  

oss003

    Combat Commando

  • Topic Starter
  • 5 posts

Posted Thu Jul 5, 2018 2:22 AM

You might want to post this to the CoCo mailing list:  https://pairlist5.pa...n/listinfo/coco

 

There will probably be people interested!

Done.....

Thanks!



#9 JamesD OFFLINE  

JamesD

    Quadrunner

  • 8,224 posts
  • Location:Flyover State

Posted Fri Jul 6, 2018 6:25 AM

Discord seems to be the best CoCo hangout these days.



#10 oss003 OFFLINE  

oss003

    Combat Commando

  • Topic Starter
  • 5 posts

Posted Mon Aug 20, 2018 1:28 AM

Hi guys,

 

I just want to mention that there is some progress in the AGD Dragon/Coco conversion.
Pere Serrat managed to get Foggy working ..... http://archive.world....php?f=5&t=1154

It should run in XRoar in Coco emulation mode.
 

Greetings

Kees


Edited by oss003, Mon Aug 20, 2018 1:29 AM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users