News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Space Hockey Type In converted to ASM - first ever ASM program after 30+ years

Started by Typhon, 00:12, 02 July 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Typhon

Dear all,

Back in the day, when I were a wee lad, the type-in "Space Hockey" from AA42 was the first ever Type-In I typed-in from Amstrad Action. Subsequently, I tried to learn Assembler, but it defeated me. Ironically, Locomotive Basic led me to a career in Programming. 

So I guess it was inevitable that 30-plus years later, I have finally decided to go back and learn Z80 Assembler. To do so, I have converted the Space Hockey type-in (which I still fondly remembered to this day!) from Locomotive Basic to ASM. 

It has now reached a stage where it is finally playable, and I have released DSK/CDT/BIN files which can be found here

Full source code is released here. Comments and criticism is most welcome. My ASM is very "belt-and-braces" and I am sure it can be improved upon.



I've enjoyed doing that, but to be honest, whilst I will continue to hone my Assembler skills, I think for any future larger development projects I'll switch to CPCTelera, as I have a background in professional C-development (though that was a few years ago now).

Best,
T.

keith56

Really great to hear, Space Hockey wasn't the first type-in I did, but it was the first I really started to understand how to use variables and loops to make a game 'engine', so I have a real soft spot for it.

I'll certainly give it a go later!... do you plan on 'upgrading it' any further either in ASM or C.

I re-typed in space hockey in on the CPC back about 6 years ago when I started getting into retro programming, though It didn't occur to me to convert it to ASM... but back a long time ago I did end up making this! https://sourceforge.net/projects/space-hockey-iphone-game/
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

Arnaud

Quote from: Typhon on 00:12, 02 July 23I've enjoyed doing that, but to be honest, whilst I will continue to hone my Assembler skills, I think for any future larger development projects I'll switch to CPCTelera, as I have a background in professional C-development (though that was a few years ago now).

You can easily use assembly and C with CPCTelera Framework, so you can keep to improve your asm skills :D

Typhon

Quote from: keith56 on 08:37, 02 July 23Really great to hear, Space Hockey wasn't the first type-in I did, but it was the first I really started to understand how to use variables and loops to make a game 'engine', so I have a real soft spot for it.

I'll certainly give it a go later!... do you plan on 'upgrading it' any further either in ASM or C.

I re-typed in space hockey in on the CPC back about 6 years ago when I started getting into retro programming, though It didn't occur to me to convert it to ASM... but back a long time ago I did end up making this! https://sourceforge.net/projects/space-hockey-iphone-game/
That looks lovely though as I've got an Android I can't test it. As far as ASM Space Hockey, I've got a couple of small fixes and features left to do:

- The screen sometimes displays artifacts due to me somehow not erasing previous player positions correctly. I'll probably just define an additional window stream covering the game field and just clear that when needed.
- I need to add diagonal ball movement.
- I need to replicate the speed of the Basic timer. Which means either profiling the various branches of code and adding NOPs as needed, or figuring out another way to lock the mainloop at a certain rate.
- I'd also like to make the code WINAPE compatible, which I assume I can do with something like good old #ifdef or equivalent?

One thing I did notice is that using the Firmware isn't the quickest - I was surprised how slow it could be.

Maybe at some point I'll do a non-Firewater equivalent but that would probably involve a sprite engine and directly manipulating the screen memory?

roudoudou

well done converting such a programm to Asm, not as easy as we may imagine
My pronouns are RASM and ACE

Typhon

Quote from: roudoudou on 13:25, 02 July 23well done converting such a programm to Asm, not as easy as we may imagine
Thank you for writing RASM. It's a lovely piece of software!

Typhon

New version (1.0.1) released, with diagonal movement added, and some bug fixes and optimisation.

https://github.com/davemoore22/cpcspacehockey/releases/tag/1.0.1

Powered by SMFPacks Menu Editor Mod