News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Breakout game assembly

Started by nico24, 03:03, 12 March 18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nico24

Hi,

Would anyone happen to have the source code of the Amstrad Computer User, August '87 article called Assembly Point. It had the listing of a Breakout type game? I have spend the weekend (what little time I have not looking after kids etc.) typing it in from the listing and it doesn't seem to work. I've done a couple of scans of the code and can't find any obvious mistakes.

Otherwise I'll have to break it down and try to get each element working. Not great considering I'm a real novice!

Thanks in advance in anyone can help.

Kind regards,

Nick

Johnny Olsen

Upload the code here and we'll look at it.

tastefulmrship

I have typed it in (as best I can)... and it almost works, but the ball misses some bricks!
Was there a correction to this program in a later issue, I wonder?




Urusergi

Hello!
the failure is very obvious. In hit_bit subrutine we have:

            sla    c
            rl    b            ; multiply BC by 2
            ld    c,b
            ld    b,0            ; and divide by 256, overall effect is to divide BC by 128
                                 ; now HL=address of required byte within bitmap table

            ld    bc,p2            ; point BC  to "powers of 2" table

We are calculating a value for BC and, suddenly, it loads BC with another value  :doh:
We also have a comment which indicates a value update of HL  ::) so probably one instruction is missing, and it's ADD HL,BC  ;D


AJW

Quote from: Urusergi on 23:52, 12 March 18
Hello!
the failure is very obvious. In hit_bit subrutine we have:

            sla    c
            rl    b            ; multiply BC by 2
            ld    c,b
            ld    b,0            ; and divide by 256, overall effect is to divide BC by 128
                                 ; now HL=address of required byte within bitmap table

            ld    bc,p2            ; point BC  to "powers of 2" table

We are calculating a value for BC and, suddenly, it loads BC with another value  :doh:
We also have a comment which indicates a value update of HL  ::) so probably one instruction is missing, and it's ADD HL,BC  ;D


Yup, that seems to fix it. Well spotted. Personally, I think it needs a bit more work anyway: it restarts immediately when your last life is gone, before you have a chance to read the score. A nice little game though.

tastefulmrship

#5

Thanks to @Urusergi for finding the fault in hit_bit! It works a treat, now! ^_^

Attached is a .dsk with the original .asm file and a slightly updated BASIC loader! I have added a "do you want to play again?" section instead of the game just restarting!


All in all, for a tiny assembler type-in, this is quite an addictive little game! Nice find, @nico24




Johnny Olsen

Almost 31 years to debug a game, it must be a new record.  :laugh:


tastefulmrship

Quote from: Johnny Olsen on 14:30, 13 March 18
Almost 31 years to debug a game, it must be a new record.  :laugh:
Better late than never, huh? ^_^

nico24

Well - can't say how happy I am that you helped out with this. Really appreciated

Kind of bummed I wasted all that time typing it in though!! Kidding...

freemac

run fine on WinAPE assembler, just adding this line :
run $
just after
org &8000
and enabling AMX Mouse input as control

Powered by SMFPacks Menu Editor Mod