Atomic AGD
Atomic AGD
Hi guys,
I started a new project: Atomic AGD and want to share my findings with you.
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-cauldwell.itch.io/arcade-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.
These are the steps I want to follow:
1. Convert the Z80 game engine to 6502 monochrome engine
2. Change the compiler to generate 6502 code
3. Add editors to easily change font-, objects-, sprites-, blocks- and screens data
4. Add colourmode
For now I am working on step 1 and this is for 70% completed. You can see some examples here:
ZX Spectrum version Terrapins: https://www.youtube.com/watch?v=ea_dsXmjL90
Atom version Terrapins: https://www.youtube.com/watch?v=Vh4ykI0H0iE&t=53s
ZX Spectrum version Dodgy: https://youtu.be/pyMmxWgJLTo
Atom version Dodgy: https://youtu.be/P9hZtE3y31M
Greetings
Kees
I started a new project: Atomic AGD and want to share my findings with you.
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-cauldwell.itch.io/arcade-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.
These are the steps I want to follow:
1. Convert the Z80 game engine to 6502 monochrome engine
2. Change the compiler to generate 6502 code
3. Add editors to easily change font-, objects-, sprites-, blocks- and screens data
4. Add colourmode
For now I am working on step 1 and this is for 70% completed. You can see some examples here:
ZX Spectrum version Terrapins: https://www.youtube.com/watch?v=ea_dsXmjL90
Atom version Terrapins: https://www.youtube.com/watch?v=Vh4ykI0H0iE&t=53s
ZX Spectrum version Dodgy: https://youtu.be/pyMmxWgJLTo
Atom version Dodgy: https://youtu.be/P9hZtE3y31M
Greetings
Kees
Last edited by oss003 on Mon Jun 18, 2018 12:21 pm, edited 2 times in total.
Re: Atomic AGD
Great to see your progress on this Kees! Really excited about this one. You know I’m a big supporter of the project, just a little tied up right now. I look forward to hearing what everyone else has to say and what the appetite might be for a BBC version...
On a tangential note, I see that Jonathan has started writing an editor for Windows as using text for sprites & screen layouts wasn’t so intuitive. I wonder if you could combine the editor, the compiler and an emulator together for the ultimate 8-bit game designer...
On a tangential note, I see that Jonathan has started writing an editor for Windows as using text for sprites & screen layouts wasn’t so intuitive. I wonder if you could combine the editor, the compiler and an emulator together for the ultimate 8-bit game designer...
Bitshifters Collective | Retro Code & Demos for BBC Micro & Acorn computers | https://bitshifters.github.io/
- SimonSideburns
- Posts: 653
- Joined: Mon Aug 26, 2013 9:09 pm
- Location: Purbrook, Hampshire
- Contact:
Re: Atomic AGD
Great progress on this Kees.
I've been playing with AGD on the Speccy for a while myself, and while I've not designed anything of release quality, I've often wondered about the possibilities of the system for other machines.
I'd love something similar for the Beeb, and if it could be developed on Windows (or any similar OS with a GUI based system) that would be fantastic.
A bit beyond my skill levels however.
I've been playing with AGD on the Speccy for a while myself, and while I've not designed anything of release quality, I've often wondered about the possibilities of the system for other machines.
I'd love something similar for the Beeb, and if it could be developed on Windows (or any similar OS with a GUI based system) that would be fantastic.
A bit beyond my skill levels however.
Just remember kids, Beeb spelled backwards is Beeb!
Re: Atomic AGD
Just a quick test with Dodgy Geezer in 4 colour mode.
It's the same game engine, only different sprite/block data.
Greetings
Kees
It's the same game engine, only different sprite/block data.
Greetings
Kees
Re: Atomic AGD
Ok guys, an update on Atomic AGD: jumping, falling and fall too far is working now so platform games will work.
Jump: https://youtu.be/SA5be2REgkg
Greetings
Kees
Jump: https://youtu.be/SA5be2REgkg
Greetings
Kees
Last edited by oss003 on Sat Mar 24, 2018 5:51 pm, edited 1 time in total.
Re: Atomic AGD
Getting closer ......... some more demo's are running now:
The compiler is working now and the engine is improved.
Alien: https://www.youtube.com/watch?v=GqzbrLY1-Mg
Baloons: https://www.youtube.com/watch?v=dUa8H39J890
Greetings
Kees
The compiler is working now and the engine is improved.
Alien: https://www.youtube.com/watch?v=GqzbrLY1-Mg
Baloons: https://www.youtube.com/watch?v=dUa8H39J890
Greetings
Kees
Re: Atomic AGD
Another update ...... object handling is working fine now.
https://www.youtube.com/watch?v=Fzu30RzXWcc
Greetings
Kees
https://www.youtube.com/watch?v=Fzu30RzXWcc
Greetings
Kees
Re: Atomic AGD
And getting closer to a working AGD engine ......
Keyhandling: https://www.youtube.com/watch?v=jQVzN6gHfO0
Inventory menu: https://www.youtube.com/watch?v=X5ND3kcyNQM
Ladders: https://www.youtube.com/watch?v=_hnHqsoLKuk
Multi screen: https://www.youtube.com/watch?v=iJCGFGjHs7c
Greetings
Kees
Keyhandling: https://www.youtube.com/watch?v=jQVzN6gHfO0
Inventory menu: https://www.youtube.com/watch?v=X5ND3kcyNQM
Ladders: https://www.youtube.com/watch?v=_hnHqsoLKuk
Multi screen: https://www.youtube.com/watch?v=iJCGFGjHs7c
Greetings
Kees
Re: Atomic AGD
Hi Kees,
The last two videos look amazing! Is this the performance at 1MHz?
Do you thing there is scope for further optimization to speed things up? Is this the drawing code:
https://github.com/oss003/Atomic-AGD/bl ... .inc#L4772
I was wondering whether it would be possible to use the 6502 bus sniffer as a profiling tool. Do you have a way of profiling the engine?
I'm also not at all familiar with AGD. Are the game definitions platform independent?
Anyway, really nice.....
Dave
The last two videos look amazing! Is this the performance at 1MHz?
Do you thing there is scope for further optimization to speed things up? Is this the drawing code:
https://github.com/oss003/Atomic-AGD/bl ... .inc#L4772
I was wondering whether it would be possible to use the 6502 bus sniffer as a profiling tool. Do you have a way of profiling the engine?
I'm also not at all familiar with AGD. Are the game definitions platform independent?
Anyway, really nice.....
Dave
Re: Atomic AGD
Hi Dave,
yes, these videos are at 1 mHz.
There certainly is need for further optimalization, for now I have converted the Z80 code to 6502 code and that's not optimal.
Especially the sprite routine can be improved. The sprites are 16x16 pixels and for every line the old sprite (2 bytes) are removed and the new sprite (2 bytes) are placed. Z80 does this with swapping registers but this is slow in 6502 code so this can be optimized.
The latest code can be found here: https://github.com/oss003/Atomic-AGD-Script-Compiler
The AGD compiler works like this:
- You have an AGD file with generic graphic definitions and script commands defining the game, system independent
- You need an engine file for the Atom with all game depending routines in 6502 code
- The compiler converts the AGD file to a 6502 assembler file and merges it with the engine file to a game source file
- The game source file can be assembled to 6502 code with CA65 and LD65.
I'm a member of the AGD development team and someone is developing a Windows AGDX Studio program to design the graphics and export them as AGD file. The goal is the create a system independent AGD file which can be compiled on several systems, with some small changes.
Greetings
Kees
yes, these videos are at 1 mHz.
There certainly is need for further optimalization, for now I have converted the Z80 code to 6502 code and that's not optimal.
Especially the sprite routine can be improved. The sprites are 16x16 pixels and for every line the old sprite (2 bytes) are removed and the new sprite (2 bytes) are placed. Z80 does this with swapping registers but this is slow in 6502 code so this can be optimized.
The latest code can be found here: https://github.com/oss003/Atomic-AGD-Script-Compiler
The AGD compiler works like this:
- You have an AGD file with generic graphic definitions and script commands defining the game, system independent
- You need an engine file for the Atom with all game depending routines in 6502 code
- The compiler converts the AGD file to a 6502 assembler file and merges it with the engine file to a game source file
- The game source file can be assembled to 6502 code with CA65 and LD65.
I'm a member of the AGD development team and someone is developing a Windows AGDX Studio program to design the graphics and export them as AGD file. The goal is the create a system independent AGD file which can be compiled on several systems, with some small changes.
Greetings
Kees
Re: Atomic AGD
Dave, I don't understand what you mean with profiling the engine, do you mean debugging?
It would be helpfull if we have an option in Atomulator for real time memory monitoring, maybe use the Memory Viewer window because I don't think anyone is using this.
PS I have added the AGD file of Atic to give you an impression how it works.
Greetings
Kees
It would be helpfull if we have an option in Atomulator for real time memory monitoring, maybe use the Memory Viewer window because I don't think anyone is using this.
PS I have added the AGD file of Atic to give you an impression how it works.
Greetings
Kees
- Attachments
-
- ATICTEST.zip
- (3.66 KiB) Downloaded 107 times
Re: Atomic AGD
Very often when trying to speed up a program people just guess where the time is going. For example, with AGD we might guess that the sprite drawing is expensive. If you are wrong, then you have wasted a day re-writing code that was already fast enough.oss003 wrote:Dave, I don't understand what you mean with profiling the engine, do you mean debugging?
Profiling lets you understand exactly where the time is spent when a programme executes. With this information, you can spend time optimizing the code that actually takes 50% of the time, rather than 0.5% of the time.
For the Atom, I'm we can hook up the 6502 Bus Sniffer to the the tube port, and that will let us capture every instruction that executes: With the 6502decoder, it's very easy to turn this back into an instruction stream. The stream length is pretty much unlimited. i.e. you could capture severl minutes of operation if you wanted.
I've just added simple profiling to the 6502decoder:
https://github.com/hoglet67/6502Decoder ... 0e6234d1f2
Here's a very small example:
Code: Select all
0800 :LL0
0800 A2 00 LDX @0
0802 :LL1
0802 A0 00 LDY @0
0804 :LL2
0804 20 07 08 JSR LL3
0807 :LL3
0807 68 PLA
0808 68 PLA
0809 88 DEY
080A D0 F8 BNE LL2
080C CA DEX
080D D0 F3 BNE LL1
080F EA NOP
0810 EA NOP
0811 EA NOP
0812 4C 00 08 JMP LL0
Code: Select all
$ decode6502 --profile=0800,08FF --quiet --byte atom_demo_capture.bin
0800 : 157998 ( 1.477851%)
0802 : 473991 ( 4.433525%)
0804 : 2843928 ( 26.600979%)
0807 : 1895952 ( 17.733986%)
0808 : 1895952 ( 17.733986%)
0809 : 947976 ( 8.866993%)
080a : 1263968 ( 11.822658%)
080c : 315992 ( 2.955664%)
080d : 421323 ( 3.940889%)
080f : 105330 ( 0.985215%)
0810 : 105330 ( 0.985215%)
0811 : 105330 ( 0.985215%)
0812 : 157995 ( 1.477823%)
: 10691065 (100.000000%)
If you can generate me an ATM file and an assembler log for your LADDERS example, I'll have a quick try at profiling it. It would be useful to have a non-trivial example to work with.
Dave
P.S. Actually, you can only hook up the 6502 Bus Snooper to the Tube port on the Atom if you bypass the data bus buffer (IC4). This is quite easy to do though. I initially forgot about IC4 and spent 10 minutes being very confused.
P.P.S. It would also be possible to add this sort of profiling to Atomulator.
Re: Atomic AGD
Thanks, I understand it now.
I have added the Atictest demo and a disas list.
mloop at #0FBF is the main gameloop.
If you can time mloop, you will have a good idea about the timing.
The routine dspr handles displaying the sprites.
I suspect that the sprite routine sspric at #1E6E is the most time consuming routine.
Can you give it a try?
Greetings
Kees
I have added the Atictest demo and a disas list.
mloop at #0FBF is the main gameloop.
If you can time mloop, you will have a good idea about the timing.
The routine dspr handles displaying the sprites.
I suspect that the sprite routine sspric at #1E6E is the most time consuming routine.
Can you give it a try?
Greetings
Kees
- Attachments
-
- atictest.zip
- (91.61 KiB) Downloaded 74 times
Re: Atomic AGD
And here's the LADDER demo.
Greetings
Kees
Greetings
Kees
- Attachments
-
- ladder.zip
- (83.37 KiB) Downloaded 82 times
Re: Atomic AGD
Here's the profile of aticdemo (I've removed any line that was less that 0.1% of the total.oss003 wrote: I suspect that the sprite routine sspric at #1E6E is the most time consuming routine.
Can you give it a try?
Code: Select all
10f0 : 22656 ( 0.192498%)
1109 : 22656 ( 0.192498%)
110c : 22656 ( 0.192498%)
1110 : 14160 ( 0.120311%)
162a : 19360 ( 0.164493%)
162c : 15488 ( 0.131595%)
162f : 23232 ( 0.197392%)
1631 : 19360 ( 0.164493%)
1a6a : 13776 ( 0.117049%)
1a8e : 14532 ( 0.123472%)
1a91 : 14532 ( 0.123472%)
1c68 : 33405 ( 0.283827%)
1c6a : 20043 ( 0.170296%)
1c6b : 33405 ( 0.283827%)
1c6d : 40086 ( 0.340593%)
1c6f : 26724 ( 0.227062%)
1c70 : 40086 ( 0.340593%)
1c72 : 40086 ( 0.340593%)
1c75 : 20039 ( 0.170263%)
1c7a : 40086 ( 0.340593%)
1c7d : 20014 ( 0.170050%)
1c82 : 40086 ( 0.340593%)
1c85 : 19650 ( 0.166957%)
1cb0 : 12456 ( 0.105833%)
1d46 : 12528 ( 0.106445%)
1d4e : 12528 ( 0.106445%)
1d56 : 12528 ( 0.106445%)
1d5e : 12528 ( 0.106445%)
1d66 : 12528 ( 0.106445%)
1d79 : 12528 ( 0.106445%)
1e79 : 77442 ( 0.657990%)
1e7c : 77442 ( 0.657990%)
1e7f : 77442 ( 0.657990%)
1e82 : 77436 ( 0.657939%)
1e85 : 25812 ( 0.219313%)
1e86 : 37858 ( 0.321663%)
1e8e : 55420 ( 0.470879%)
1e90 : 138550 ( 1.177198%)
1e92 : 110840 ( 0.941758%)
1e95 : 138550 ( 1.177198%)
1e97 : 166260 ( 1.412638%)
1e99 : 138550 ( 1.177198%)
1e9b : 138545 ( 1.177156%)
1e9d : 138545 ( 1.177156%)
1e9f : 110836 ( 0.941724%)
1ea2 : 138545 ( 1.177156%)
1ea4 : 166254 ( 1.412587%)
1ea6 : 166254 ( 1.412587%)
1ea9 : 82210 ( 0.698502%)
1eae : 138545 ( 1.177156%)
1eb0 : 138545 ( 1.177156%)
1eb2 : 138545 ( 1.177156%)
1eb4 : 166254 ( 1.412587%)
1eb6 : 166254 ( 1.412587%)
1eb9 : 83127 ( 0.706293%)
1ebe : 138545 ( 1.177156%)
1ec0 : 55418 ( 0.470862%)
1ec1 : 83127 ( 0.706293%)
1ec3 : 55418 ( 0.470862%)
1ec5 : 83127 ( 0.706293%)
1ec7 : 79663 ( 0.676861%)
1ec9 : 17320 ( 0.147160%)
1ecb : 166254 ( 1.412587%)
49c6 : 82602 ( 0.701833%)
49c8 : 82602 ( 0.701833%)
49ca : 82602 ( 0.701833%)
49cc : 82602 ( 0.701833%)
49ce : 82602 ( 0.701833%)
49d0 : 82602 ( 0.701833%)
49d2 : 82602 ( 0.701833%)
49d4 : 82602 ( 0.701833%)
49d6 : 82602 ( 0.701833%)
49d8 : 82602 ( 0.701833%)
49da : 82602 ( 0.701833%)
49dc : 82602 ( 0.701833%)
49de : 82602 ( 0.701833%)
49e0 : 82602 ( 0.701833%)
49e2 : 82602 ( 0.701833%)
49e4 : 82602 ( 0.701833%)
49e6 : 82602 ( 0.701833%)
49e8 : 82602 ( 0.701833%)
49ea : 82602 ( 0.701833%)
49ec : 82602 ( 0.701833%)
49ee : 82602 ( 0.701833%)
49f0 : 82602 ( 0.701833%)
49f2 : 82602 ( 0.701833%)
49f4 : 82602 ( 0.701833%)
49f6 : 165204 ( 1.403665%)
fe6b : 2129056 ( 18.089646%)
fe6e : 1596446 ( 13.564295%)
Dave
Re: Atomic AGD
Can you try the mloop routine, hopefully it fits within 1/50 sec?
Maybe you can do somthing like this:
Greetings
Kees
Maybe you can do somthing like this:
Code: Select all
10f0 : 22656 ( 0.192498%) +++++++++
1109 : 22656 ( 0.192498%) +++++++++
110c : 22656 ( 0.192498%) +++++++++
1110 : 14160 ( 0.120311%) ++++++
162a : 19360 ( 0.164493%) ++++++++
162c : 15488 ( 0.131595%) ++++++
162f : 23232 ( 0.197392%) ++++++++++
1631 : 19360 ( 0.164493%) ++++++
1a6a : 13776 ( 0.117049%) +++++
1a8e : 14532 ( 0.123472%) ++++++
1a91 : 14532 ( 0.254321%) ++++++++++++
Kees
Re: Atomic AGD
(A thought: we don't want to know which instructions are executed most often, so much as where in the code the most time is spent. So, we need cycles consumed rather than times executed - if we don't already have that [and it seems we do, oops] - and perhaps it's worth binning the results into 8 byte or 16 byte paragraphs, in the absence of any idea of function boundaries or loop extents or basic blocks...??)
Re: Atomic AGD
The counts are already 6502 cycle counts:BigEd wrote:(A thought: we don't want to know which instructions are executed most often, so much as where in the code the most time is spent. So, we need cycles consumed rather than times executed - if we don't already have that - and perhaps it's worth binning the results into 8 byte or 16 byte paragraphs, in the absence of any idea of function boundaries or loop extents or basic blocks...??)
https://github.com/hoglet67/6502Decoder ... ain.c#L361
I'd really like to get to the call graph though.
Re: Atomic AGD
Yes, sorry about that! Do you think aggregating by paragraphs would help? The idea is to compress the information and make the hot code stand out more, and with no flow analysis needed.
Re: Atomic AGD
Here's an example with 16-byte buckets:BigEd wrote:Yes, sorry about that! Do you think aggregating by paragraphs would help? The idea is to compress the information and make the hot code stand out more, and with no flow analysis needed.
Code: Select all
0640 : 2076 ( 0.025815%) *
0650 : 1038 ( 0.012907%) *
0e30 : 6 ( 0.000075%) *
0e40 : 560 ( 0.006964%) *
0e50 : 994 ( 0.012360%) *
0e60 : 6 ( 0.000075%) *
0f80 : 24 ( 0.000298%) *
0f90 : 26 ( 0.000323%) *
0fa0 : 24 ( 0.000298%) *
0fb0 : 1056 ( 0.013131%) *
0fc0 : 4170 ( 0.051853%) *
0fd0 : 3460 ( 0.043025%) *
0fe0 : 4152 ( 0.051630%) *
0ff0 : 4498 ( 0.055932%) *
1000 : 2941 ( 0.036571%) *
1010 : 2415 ( 0.030030%) *
1070 : 12 ( 0.000149%) *
1080 : 3 ( 0.000037%) *
10d0 : 7552 ( 0.093908%) *
10e0 : 9440 ( 0.117385%) **
10f0 : 68000 ( 0.845573%) *********
1100 : 71764 ( 0.892378%) *********
1110 : 16992 ( 0.211294%) ***
1120 : 2 ( 0.000025%) *
1130 : 85 ( 0.001057%) *
1140 : 190 ( 0.002363%) *
1150 : 155 ( 0.001927%) *
12f0 : 112 ( 0.001393%) *
1300 : 694 ( 0.008630%) *
1310 : 306 ( 0.003805%) *
1320 : 184 ( 0.002288%) *
1330 : 224 ( 0.002785%) *
1340 : 224 ( 0.002785%) *
1350 : 240 ( 0.002984%) *
1360 : 264 ( 0.003283%) *
1370 : 304 ( 0.003780%) *
1380 : 176 ( 0.002189%) *
1390 : 240 ( 0.002984%) *
13a0 : 48 ( 0.000597%) *
1550 : 8712 ( 0.108333%) **
1560 : 12584 ( 0.156481%) **
1570 : 17424 ( 0.216666%) ***
1580 : 13552 ( 0.168518%) **
1590 : 10648 ( 0.132407%) **
15e0 : 9680 ( 0.120370%) **
15f0 : 12584 ( 0.156481%) **
1600 : 14520 ( 0.180555%) **
1610 : 11132 ( 0.138425%) **
1620 : 71148 ( 0.884718%) *********
1630 : 55660 ( 0.692126%) *******
1640 : 2904 ( 0.036111%) *
16e0 : 8 ( 0.000099%) *
16f0 : 26 ( 0.000323%) *
1700 : 22 ( 0.000274%) *
1710 : 23 ( 0.000286%) *
1720 : 30 ( 0.000373%) *
1730 : 102 ( 0.001268%) *
1740 : 8976 ( 0.111616%) **
1750 : 3701 ( 0.046022%) *
1760 : 3267 ( 0.040625%) *
1770 : 1691 ( 0.021027%) *
1780 : 4523 ( 0.056243%) *
1790 : 4000 ( 0.049740%) *
1850 : 280 ( 0.003482%) *
1860 : 880 ( 0.010943%) *
1870 : 2548 ( 0.031684%) *
1880 : 2760 ( 0.034320%) *
1890 : 6900 ( 0.085801%) *
18a0 : 7590 ( 0.094381%) *
18b0 : 4416 ( 0.054912%) *
19c0 : 3864 ( 0.048048%) *
19d0 : 5520 ( 0.068641%) *
19e0 : 3450 ( 0.042900%) *
19f0 : 2208 ( 0.027456%) *
1a20 : 7552 ( 0.093908%) *
1a30 : 7552 ( 0.093908%) *
1a40 : 9688 ( 0.120469%) **
1a50 : 48440 ( 0.602346%) *******
1a60 : 48566 ( 0.603913%) *******
1a70 : 4844 ( 0.060235%) *
1a80 : 26988 ( 0.335593%) ****
1a90 : 27334 ( 0.339895%) ****
1aa0 : 1384 ( 0.017210%) *
1ab0 : 3460 ( 0.043025%) *
1be0 : 692 ( 0.008605%) *
1bf0 : 23707 ( 0.294794%) ***
1c00 : 19412 ( 0.241386%) ***
1c10 : 31169 ( 0.387583%) ****
1c20 : 18657 ( 0.231998%) ***
1c30 : 13749 ( 0.170967%) **
1c40 : 7860 ( 0.097738%) *
1c50 : 7487 ( 0.093100%) *
1c60 : 156807 ( 1.949878%) ********************
1c70 : 160509 ( 1.995912%) ********************
1c80 : 64170 ( 0.797947%) ********
1c90 : 30285 ( 0.376591%) ****
1ca0 : 32005 ( 0.397979%) ****
1cb0 : 29953 ( 0.372462%) ****
1cc0 : 22542 ( 0.280307%) ***
1cd0 : 21675 ( 0.269526%) ***
1ce0 : 19074 ( 0.237183%) ***
1cf0 : 20808 ( 0.258745%) ***
1d00 : 24276 ( 0.301869%) ****
1d10 : 7803 ( 0.097029%) *
1d20 : 2094 ( 0.026039%) *
1d30 : 37329 ( 0.464182%) *****
1d40 : 62640 ( 0.778922%) ********
1d50 : 62640 ( 0.778922%) ********
1d60 : 56376 ( 0.701029%) ********
1d70 : 43138 ( 0.536416%) ******
1d80 : 14673 ( 0.182457%) **
1d90 : 19105 ( 0.237569%) ***
1da0 : 11713 ( 0.145650%) **
1db0 : 7755 ( 0.096433%) *
1dc0 : 18964 ( 0.235815%) ***
1dd0 : 24998 ( 0.310847%) ****
1de0 : 21748 ( 0.270434%) ***
1df0 : 20904 ( 0.259939%) ***
1e00 : 39015 ( 0.485147%) *****
1e10 : 34660 ( 0.430993%) *****
1e20 : 43105 ( 0.536006%) ******
1e30 : 35980 ( 0.447407%) *****
1e40 : 42067 ( 0.523099%) ******
1e50 : 15679 ( 0.194967%) **
1e60 : 7166 ( 0.089108%) *
1e70 : 244380 ( 3.038839%) *******************************
1e80 : 206846 ( 2.572107%) **************************
1e90 : 1080676 ( 13.438088%) ***************************************************************************************************************************************
1ea0 : 697310 ( 8.670974%) ***************************************************************************************
1eb0 : 831270 ( 10.336752%) ********************************************************************************************************
1ec0 : 540327 ( 6.718907%) ********************************************************************
1f20 : 1456 ( 0.018105%) *
1f30 : 4576 ( 0.056902%) *
1f40 : 5897 ( 0.073329%) *
1f70 : 1872 ( 0.023278%) *
1f80 : 27462 ( 0.341487%) ****
1f90 : 26266 ( 0.326615%) ****
1fa0 : 18290 ( 0.227434%) ***
1fb0 : 2160 ( 0.026859%) *
1fc0 : 2619 ( 0.032567%) *
1fd0 : 2732 ( 0.033972%) *
1fe0 : 1219 ( 0.015158%) *
1ff0 : 641 ( 0.007971%) *
2000 : 164 ( 0.002039%) *
2010 : 81 ( 0.001007%) *
2050 : 18 ( 0.000224%) *
2060 : 46 ( 0.000572%) *
2070 : 19 ( 0.000236%) *
2080 : 26 ( 0.000323%) *
2090 : 3 ( 0.000037%) *
21c0 : 34938 ( 0.434450%) *****
21d0 : 19426 ( 0.241560%) ***
21e0 : 45 ( 0.000560%) *
21f0 : 30 ( 0.000373%) *
2200 : 21 ( 0.000261%) *
2210 : 53 ( 0.000659%) *
2220 : 84 ( 0.001045%) *
2230 : 40 ( 0.000497%) *
2240 : 21 ( 0.000261%) *
2250 : 153 ( 0.001903%) *
2260 : 173 ( 0.002151%) *
2270 : 29 ( 0.000361%) *
22b0 : 20 ( 0.000249%) *
22c0 : 50 ( 0.000622%) *
22d0 : 19 ( 0.000236%) *
22e0 : 16 ( 0.000199%) *
22f0 : 6 ( 0.000075%) *
2300 : 27 ( 0.000336%) *
2310 : 24 ( 0.000298%) *
2320 : 24 ( 0.000298%) *
2330 : 21 ( 0.000261%) *
2340 : 24 ( 0.000298%) *
2350 : 32 ( 0.000398%) *
2360 : 28 ( 0.000348%) *
2370 : 9 ( 0.000112%) *
2c80 : 1211 ( 0.015059%) *
2c90 : 4029 ( 0.050100%) *
2ca0 : 1169 ( 0.014536%) *
2cb0 : 1118 ( 0.013902%) *
2cc0 : 2379 ( 0.029583%) *
2cd0 : 240 ( 0.002984%) *
2ce0 : 220 ( 0.002736%) *
2cf0 : 2023 ( 0.025156%) *
2d20 : 1903 ( 0.023664%) *
2d50 : 2422 ( 0.030117%) *
2d60 : 2420 ( 0.030092%) *
2d70 : 1573 ( 0.019560%) *
2d80 : 1211 ( 0.015059%) *
2d90 : 2076 ( 0.025815%) *
2da0 : 1923 ( 0.023912%) *
2db0 : 3222 ( 0.040065%) *
2dc0 : 1478 ( 0.018379%) *
2dd0 : 21 ( 0.000261%) *
2de0 : 24 ( 0.000298%) *
2df0 : 21 ( 0.000261%) *
2e00 : 23 ( 0.000286%) *
2e10 : 22 ( 0.000274%) *
2e20 : 19 ( 0.000236%) *
2e30 : 15 ( 0.000187%) *
2e70 : 870 ( 0.010818%) *
2e80 : 1092 ( 0.013579%) *
2e90 : 429 ( 0.005335%) *
2ea0 : 464 ( 0.005770%) *
2eb0 : 191 ( 0.002375%) *
2ec0 : 560 ( 0.006964%) *
2ed0 : 552 ( 0.006864%) *
2ee0 : 504 ( 0.006267%) *
2ef0 : 419 ( 0.005210%) *
2f00 : 628 ( 0.007809%) *
2f10 : 960 ( 0.011937%) *
2f20 : 840 ( 0.010445%) *
2f30 : 604 ( 0.007511%) *
2f60 : 532 ( 0.006615%) *
2f90 : 392 ( 0.004874%) *
2fa0 : 6471 ( 0.080466%) *
2fb0 : 8310 ( 0.103334%) **
2fc0 : 10696 ( 0.133004%) **
2fd0 : 4208 ( 0.052326%) *
2fe0 : 78 ( 0.000970%) *
2ff0 : 78 ( 0.000970%) *
3000 : 60 ( 0.000746%) *
3010 : 75 ( 0.000933%) *
3020 : 90 ( 0.001119%) *
3030 : 66 ( 0.000821%) *
3040 : 69 ( 0.000858%) *
3050 : 84 ( 0.001045%) *
3060 : 41 ( 0.000510%) *
3070 : 3073 ( 0.038212%) *
3080 : 1872 ( 0.023278%) *
3090 : 1560 ( 0.019398%) *
30a0 : 1638 ( 0.020368%) *
30b0 : 1560 ( 0.019398%) *
30c0 : 1509 ( 0.018764%) *
30d0 : 449 ( 0.005583%) *
30e0 : 44 ( 0.000547%) *
30f0 : 56 ( 0.000696%) *
3100 : 48 ( 0.000597%) *
3110 : 44 ( 0.000547%) *
3120 : 54 ( 0.000671%) *
3130 : 1269 ( 0.015780%) *
3140 : 1295 ( 0.016103%) *
3150 : 1037 ( 0.012895%) *
3190 : 1159 ( 0.014412%) *
31a0 : 1403 ( 0.017446%) *
31b0 : 2650 ( 0.032952%) *
31d0 : 1918 ( 0.023850%) *
31f0 : 1918 ( 0.023850%) *
3200 : 1141 ( 0.014188%) *
3210 : 803 ( 0.009985%) *
3220 : 373 ( 0.004638%) *
3230 : 400 ( 0.004974%) *
3240 : 756 ( 0.009401%) *
3250 : 926 ( 0.011515%) *
3260 : 781 ( 0.009712%) *
3270 : 228 ( 0.002835%) *
3280 : 3252 ( 0.040438%) *
3290 : 36 ( 0.000448%) *
32a0 : 40 ( 0.000497%) *
32b0 : 44 ( 0.000547%) *
32c0 : 74 ( 0.000920%) *
32d0 : 124 ( 0.001542%) *
32e0 : 134 ( 0.001666%) *
32f0 : 156 ( 0.001940%) *
3300 : 2218 ( 0.027581%) *
3310 : 2131 ( 0.026499%) *
3320 : 2076 ( 0.025815%) *
3330 : 6 ( 0.000075%) *
49c0 : 413010 ( 5.135734%) ****************************************************
49d0 : 660816 ( 8.217175%) ***********************************************************************************
49e0 : 660816 ( 8.217175%) ***********************************************************************************
49f0 : 413010 ( 5.135734%) ****************************************************
: 8041888 (100.000000%)
Re: Atomic AGD
(ooh, that looks relatively digestible to me! Will be interesting to see what Kees thinks.)
Re: Atomic AGD
This confirms my suspicion, it is the sprite routine.
The routine at #1E8E displays 2 bytes of the sprite and is called 32 times per sprite.
To swap the old- and new spriteaddress, the routine #49C6 is also called 32 times per sprite.
So these are indeed time consuming routines.
Nice job Dave ....
Greetings
Kees
The routine at #1E8E displays 2 bytes of the sprite and is called 32 times per sprite.
To swap the old- and new spriteaddress, the routine #49C6 is also called 32 times per sprite.
So these are indeed time consuming routines.
Nice job Dave ....
Greetings
Kees
Re: Atomic AGD
And here's a complete game this time: Mike the Guitar written by Sebastian Braunert and Uwen Geiken:
https://www.youtube.com/watch?v=9ErOVp3itLI
Greetings
Kees
https://www.youtube.com/watch?v=9ErOVp3itLI
Greetings
Kees
Re: Atomic AGD
And some more progress .......... (looking familiar John .......... )
Does however need some work ....
https://youtu.be/SWbh4SkU4o0
Greetings
Kees
Does however need some work ....
https://youtu.be/SWbh4SkU4o0
Greetings
Kees
- Attachments
-
- foggy.png (8.25 KiB) Viewed 9500 times
Re: Atomic AGD
oh my, that's fantastic, One of deathmonks best...I was thinking about this on a beeb, but this is pretty close.oss003 wrote:And some more progress .......... (looking familiar John .......... )
Does however need some work ....
https://youtu.be/SWbh4SkU4o0
Greetings
Kees
So many projects, so little time...
Re: Atomic AGD
Hi Kees,
Again, some very nice work here.
I'd like to try to build the "Foggy" demo (again as a good test of the profiler I'm working on).
Are the files for this checked into your github?
Also, I've spotted a bug in the script compiler that causes a core dump on Linux. In main() you have:
and then later:
That's wrong, because cChar is not initialized to point to anything. So the read ends up writing to location 0.
A fix would be to change the definition to:
This fixes the core dump for me.
Dave
Again, some very nice work here.
I'd like to try to build the "Foggy" demo (again as a good test of the profiler I'm working on).
Are the files for this checked into your github?
Also, I've spotted a bug in the script compiler that causes a core dump on Linux. In main() you have:
Code: Select all
char *cChar;
Code: Select all
lSize = fread( cChar, 1, 1, pEngine ); /* read first character of engine source. */
A fix would be to change the definition to:
Code: Select all
char cbuf;
char *cChar = &cbuf;
Dave
Re: Atomic AGD
Ok, I've updated Github and added your update ...thanks.
The compiler has some more updates like adding a Font is nUseFont=1 and a Createmessage problem is solved with multiline messages.
Foggy is too big to fit in $0300-$07fff so I removed the font.
This means that FONTFOG.ATM has to be loaded at $9800 before Foggy is executed.
It's still buggy but the titlesscreen is ok and the first screen is playable.
Greetings
Kees
The compiler has some more updates like adding a Font is nUseFont=1 and a Createmessage problem is solved with multiline messages.
Foggy is too big to fit in $0300-$07fff so I removed the font.
This means that FONTFOG.ATM has to be loaded at $9800 before Foggy is executed.
It's still buggy but the titlesscreen is ok and the first screen is playable.
Greetings
Kees
Re: Atomic AGD
Another update ...... a part of the partical engine is working now ... trailing
https://www.youtube.com/watch?v=M42u5ewiwbE
Greetings
Kees
https://www.youtube.com/watch?v=M42u5ewiwbE
Greetings
Kees