CPCWiki forum

General Category => Games => Topic started by: 40Crisis on 13:24, 11 June 16

Title: Space Invaders Arcade Emulator for Amstrad CPC
Post by: 40Crisis on 13:24, 11 June 16
You can download here the very first release of Space Invaders Arcade Emulator for Amstrad/Schneider CPC range.
Space invaders is (C) 1978 by Taito Coporation

No needs to present Space Invaders. It's one of the first arcade games and it has been cloned so many times on nearly 
all computers/consoles plateforms.
It's a so iconic videogame and a videogame legend !

For copyright reasons, you need to provide your set of Space Invaders roms to play Space Invaders in emulator.

Please read the "Space_Invaders_Arcade_Emulator_For_Amstrad_CPC_v1.00.txt" file for details.

Enjoy.
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: TotO on 14:07, 11 June 16
Hey!  ;D

Nice to see a new arcade emulator on CPC. I'm going to try it!
After buying the PCB on ebay, extracting the ROM and converting them into files for the CPC DSK. Sure...  8)
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: TotO on 16:53, 11 June 16
Just received my PCB 1 hour ago, extracted ROM and done the CPC DSK!  :-\

Except the sound, as you said, it is a nice V1.0 enjoyable emulator.
Congratulation!  8)
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Token on 20:39, 11 June 16
Impressive work, played it on my GT-64. Looks and play awesome. Thank you!  :D

Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: TotO on 20:53, 11 June 16
Yes, it should be more impressive on it!!!  :)
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: TFM on 22:33, 11 June 16
Quote from: TotO on 16:53, 11 June 16
Just received my PCB 1 hour ago, extracted ROM and done the CPC DSK!  :-\

Except the sound, as you said, it is a nice V1.0 enjoyable emulator.
Congratulation!  8)


Mine arrived too. Could you please upload your DSK, so I can check if the ROMs are identical. 8) ;) :) [nb]btw: My antivirus bocks DSK creation at my PC at work.  :( [/nb]
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Devilmarkus on 22:40, 11 June 16
I burned it to Cartridge Eprom.
Man, what should I say?
Really amazing on my GX4000!
Even Chase HQ 2 cannot stand it!  8)

Ok, troll mode off... Please anyone send me a DSK with "Read Only Memory" files included...
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: CraigsBar on 22:57, 11 June 16
I'll put one together tonight. Once you prove you have original cabinet I'll mail you one :)


Edit: OK The roms are easy to find... think EMUlation in a tropical PARADISE (it's invaders.zip that you want)


the result is great, a nice turn of speed and certainly very playable - excellent work all round, well done I love it.
Title: Space Invaders Arcade Emulator for Amstrad CPC
Post by: 40Crisis on 23:24, 11 June 16
To all, please don"t put complete version with roms on the public part of this forum.

I took special care not to violate copyrights laws.
I don't want to put cpcwiki or anybody in trouble if it could be the case.


Thanks for respecting that.
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: CraigsBar on 23:35, 11 June 16
Quote from: 40Crisis on 23:24, 11 June 16
To all, please don"t put complete version with roms on the public part of this forum.

I took special care not to violate copyrights laws.
I don't want to put cpcwiki or anybody in trouble if it could be the case.


Thanks for respecting that.

I have no intention of doing that. But I have made a set on DSK and CPR, and I can confirm it works, Although the CPR needs some buttons remapping for GX4000 compatibility... @Phantomz (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1308) are you reading this mate?
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Tolkin on 00:18, 12 June 16
Hy, tried it and it is very playable and looks good with the "Overlay" Emulation.
Really cool!
Thanks for this  :)
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Phantomz on 03:16, 12 June 16
Quote from: CraigsBar on 23:35, 11 June 16
I have no intention of doing that. But I have made a set on DSK and CPR, and I can confirm it works, Although the CPR needs some buttons remapping for GX4000 compatibility... @Phantomz (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1308) are you reading this mate?

@CraigsBar (http://www.cpcwiki.eu/forum/index.php?action=profile;u=482)

I requested a builder without compression, @40Crisis (http://www.cpcwiki.eu/forum/index.php?action=profile;u=951) was kind enough to do this.  8)

I have now given instructions in my next post on how to make a version for the GX4000.  ;D
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: 40Crisis on 08:13, 12 June 16
Quote from: Phantomz on 03:16, 12 June 16
The good news is that I can find everything that needs changing for the GX4000 in winape, the bad news is I can't find this on the disk or cart.  :doh:

Must be due to how the disk is made ( compression ) ?

I didn't bother changing Ctrl+Shift+Esc: to Reset CPC.

I did change the controls to;


Joypad 1 Button 1 or Button 2 to pass screen with red text.

Joypad 1 Button 1 = Start 1P
Joypad 1 Button 2 = Start 2P
Joypad 1 UP or DOWN = Put Coin

Joypad 2 Button 1 = Display Space invaders dip switch options as follows:
Joypad 2 Button 2 = Emulate Tilt
Joypad 2 UP = switch for coin info
Joypad 2 LEFT= switch for extra life (1000 or 1500 points, 1500 by default)
Joypad 2 RIGHT = switch for number of player ships (3 to 6, 3 by default)

Maybe @40Crisis (http://www.cpcwiki.eu/forum/index.php?action=profile;u=951) can make a version that isn't compressed or make the changes, I mean to the original upload ( not containing any roms ).  :)

The following need to be changed.

CD 18 BB FE FC CA 00 00 FE 0D 28 04 FE 8B   TO   CD 18 BB FE 50 CA 00 00 FE 58 28 04 FE 5A
3A 26 55 E6 01   TO   3A 27 55 E6 10     
3A 26 55 E6 02   TO   3A 27 55 E6 20     
3A 25 55 E6 01   TO   3A 27 55 E6 01     
3A 24 55 E6 02   TO   3A 27 55 E6 02     
3A 25 55 E6 20   TO   3A 24 55 E6 10     
3A 1E 55 E6 08   TO   3A 24 55 E6 20     
3A 1F 55 E6 20   TO   3A 24 55 E6 01     
3A 1F 55 E6 40   TO   3A 24 55 E6 04     
3A 1E 55 E6 20   TO   3A 24 55 E6 08   

Hope this info can be put to use.  ;D

As requested, Here's the builder without compression
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: alex76gr on 11:16, 12 June 16
Thank you so much for this. :)
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Devilmarkus on 12:19, 12 June 16
Managed to play it.
Really nice and good work!
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Puresox on 12:55, 12 June 16
Any vids of this about as yet?
Interested in how the speed compares .
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Phantomz on 14:52, 12 June 16
Quote from: 40Crisis on 08:13, 12 June 16
As requested, Here's the builder without compression

@40Crisis (http://www.cpcwiki.eu/forum/index.php?action=profile;u=951)    Thanks for doing that, GX4000 owners can put my work to use now, Cheers  ;D

@CraigsBar (http://www.cpcwiki.eu/forum/index.php?action=profile;u=482)  You and anyone else that wants to convert to cart and play on the GX4000 can do so now.

Just use the new builder without compression that @40Crisis (http://www.cpcwiki.eu/forum/index.php?action=profile;u=951) kindly posted in his last post.

Use that builder to create the disk as normal.

with an hex editor open that disk and change the following.

CD 18 BB FE FC CA 00 00 FE 0D 28 04 FE 8B   TO   CD 18 BB FE 70 CA 00 00 FE 58 28 04 FE 5A
3A 26 55 E6 01   TO   3A 27 55 E6 10      
3A 26 55 E6 02   TO   3A 27 55 E6 20      
3A 25 55 E6 01   TO   3A 27 55 E6 01      
3A 24 55 E6 02   TO   3A 27 55 E6 02      
3A 25 55 E6 20   TO   3A 24 55 E6 10      
3A 1E 55 E6 08   TO   3A 24 55 E6 20      
3A 1F 55 E6 20   TO   3A 24 55 E6 01      
3A 1F 55 E6 40   TO   3A 24 55 E6 04      
3A 1E 55 E6 20   TO   3A 24 55 E6 08   

50 52 45 53 53 20 45 73 63   TO   50 52 45 53 53 20 28 50 29
74 79 70 65 20 45 6E 74 65 72 2F 52 65 74 75 72 6E 20 74 6F 20 63 6F 6E 74 69 6E 75 65 2E   TO   50 72 65 73 73 20 4A 6F 79 70 61 64 20 31 20 42 75 74 74 6F 6E 20 31 20 6F 72 20 32 2E 00

This will change the controls to;

Joypad 1 Button 1 or Button 2 to pass screen with red text.

Joypad 1 Button 1 = Start 1P
Joypad 1 Button 2 = Start 2P
Joypad 1 UP or DOWN = Put Coin

Joypad 2 Button 1 = Display Space invaders dip switch options as follows:
Joypad 2 Button 2 = Emulate Tilt
Joypad 2 UP = switch for coin info
Joypad 2 LEFT= switch for extra life (1000 or 1500 points, 1500 by default)
Joypad 2 RIGHT = switch for number of player ships (3 to 6, 3 by default)

Change the following too if you don't want the console pause button to move right!

3A 22 55 E6 04   TO   3A 22 55 E6 80
3A 21 55 E6 08   TO   3A 21 55 E6 80
3A 26 55 E6 08   TO   3A 26 55 E6 80

This will change the following;

O = Left     TO  <
P = Right   TO  >
Q = Fire     TO  Z

If you do the above, it will free up P Console Pause Button, so you could use this to insert coins if you wish instead of joystick up or down, if so don't change the following from the above list.

3A 25 55 E6 01   TO   3A 27 55 E6 01      
3A 24 55 E6 02   TO   3A 27 55 E6 02   

Change the following instead;

3A 25 55 E6 01   TO   3A 21 55 E6 08      
3A 24 55 E6 02   TO   3A 21 55 E6 08


Then run nocart and make your GX4000 cpr.  8)

If you following my instructions you will end up with a version that you can play on your GX4000  8)

I know it works, as I've just tested it out on my GX4000, sorry I can't upload the disk and cpr.

Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: CraigsBar on 16:43, 12 June 16
Unless there is MUCH more data in the uncompressed copy the last 2 tracks are blank anyway so the 40 track limit is not an issue here :)



Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: VincentGR on 16:52, 12 June 16
Quote from: Puresox on 12:55, 12 June 16
Any vids of this about as yet?
Interested in how the speed compares .

Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Phantomz on 16:56, 12 June 16
Quote from: CraigsBar on 16:43, 12 June 16
Unless there is MUCH more data in the uncompressed copy the last 2 tracks are blank anyway so the 40 track limit is not an issue here :)

Should be fine, I moved it to a 40 disk to be safe, just changed my instructions for people though as shouldn't be a problem, it's only a small single bin.  ;D

Hope you are happy with my work and how I mapped the buttons.  ;D
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: CraigsBar on 17:01, 12 June 16
Hell yeah. I'll see if I am able to get the same results later on. I am sure I am not so stupid to foul it up.... But you never know lol.
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Puresox on 19:28, 12 June 16
Well  that is darn impressive ,  speed looks pretty good colours look pretty authentic . Sound need tweaking but it's a great job by the looks
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: 40Crisis on 19:35, 12 June 16
Quote from: Puresox on 19:28, 12 June 16
Well  that is darn impressive ,  speed looks pretty good colours look pretty authentic . Sound need tweaking but it's a great job by the looks

I tried to emulate the display as closed as possible to original. Every pixel on screen should be identical to arcade.
Overlay color emulation is a tradeoff between speed and pixel position accuracy. But you hardly notice differences with arcade.


Space Invaders uses a intel 8080 processor at 1,996800 Mhz (rounded to 2 Mhz)
The emulator on the CPC executes the original code nearly as is because Z80 is object code compatible/binary compatible with 8080.
This is because Z80's designers are identical to 8080, and they designed the Z80 to be fully compatible with 8080.
8080 appeared two years before Z80.
As the cpc has a frequency of 4 Mhz with nearly same timings for instructions as for 8080, the CPC CPU speed is fast enough.

Space invaders only hardware acceleration feature uses a hardware shifter on 16 bits to speedup sprite display and because 8080 lacks 
instructions to shift data. In all cases 8080 CPU is used to write data to graphic memory.
 
As far as I known, only one alien is moved on screen every 60th of second.

Most of the sprites on the arcade are displayed at X coordinate aligned on 8 (aligned on byte boundary)
As we need to rotate the screen 90 degrees anticlockwise, Y arcade becomes X cpc, this leads to extra CPU usage on CPC, 
because nearly sprites are not aligned on byte boundary on the CPC and should be masked with AND / OR algorithm. 
To speed up sprites display, sprites are stored already rotated in CPC memory.

With analysing code CPU consumption, the most consuming task is when the game checks if aliens have reached left or right border to 
reverse the way they move.
This is surprisingly done by checking the content of 2 * 184 bytes vertical column of video memory every frame.

In CPC emulator, the game is rendered at 60 Hz but display refresh rate is only 50 Hz.
I didn't check it with accuracy, but speed of CPC emulated game should be the same as arcade game. 

This was possible on the CPC because Space Invaders doesn't use hardware sprites, CPU is used to write video memory, video memory is black/white (1bit per pixel), 
the refresh rate of sprites is low and of course because 8080 code is executed natively.
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: VincentGR on 20:47, 12 June 16
Gentlemen, direct comparison.
The speed is amazing!!!

Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: CraigsBar on 23:05, 12 June 16
@Phantomz your remapped controls are awesome. @40Crisis the emulator is brilliant. Having loved Space Invaders since a kid I always longed for an arcade perfect port and now in 2016 I have it.
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Phantomz on 00:32, 13 June 16
Quote from: CraigsBar on 23:05, 12 June 16
@Phantomz (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1308) your remapped controls are awesome. @40Crisis (http://www.cpcwiki.eu/forum/index.php?action=profile;u=951) the emulator is brilliant. Having loved Space Invaders since a kid I always longed for an arcade perfect port and now in 2016 I have it.

@CraigsBar (http://www.cpcwiki.eu/forum/index.php?action=profile;u=482)

You're welcome, glad you like them, I take it you got it to work ok then.  ;D

I've added the following to the instructions.

Change the following too if you don't want the console pause button to move right!

3A 22 55 E6 04   TO   3A 22 55 E6 80
3A 21 55 E6 08   TO   3A 21 55 E6 80
3A 26 55 E6 08   TO   3A 26 55 E6 80

This will change the following;

O = Left     TO  <
P = Right   TO  >
Q = Fire     TO  Z

If you do the above, it will free up P Console Pause Button, so you could use this to insert coins if you wish instead of joystick up or down, if so don't change the following from the above list.

3A 25 55 E6 01   TO   3A 27 55 E6 01      
3A 24 55 E6 02   TO   3A 27 55 E6 02   

Change the following instead;

3A 25 55 E6 01   TO   3A 21 55 E6 08      
3A 24 55 E6 02   TO   3A 21 55 E6 08
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: TFM on 16:35, 13 June 16
Thank's for the videos! The emulation seems to be really well done.  :)
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Phantomz on 17:11, 13 June 16
I've found how to change the default dip switch options for those interested.  ;)

You could change these to a default that you like so you don't need to keep changing them.  ;D

Using the uncompressed version of the emulator.

Use a HEX Editor and change the default dip switch options from

B0 D1 E1 C1 F1 C9 00 00

To

SWITCH OPTIONS

COIN ON AND EXTRA LIFE @ 1500 + PLAYER SHIPS   
B0 D1 E1 C1 F1 C9 00 00 = 3 SHIPS      
B0 D1 E1 C1 F1 C9 01 01 = 4 SHIPS
B0 D1 E1 C1 F1 C9 02 02 = 5 SHIPS
B0 D1 E1 C1 F1 C9 03 03 = 6 SHIPS

COIN OFF AND EXTRA LIFE @ 1500 + PLAYER SHIPS
B0 D1 E1 C1 F1 C9 80 00 = 3 SHIPS
B0 D1 E1 C1 F1 C9 81 01 = 4 SHIPS
B0 D1 E1 C1 F1 C9 82 02 = 5 SHIPS
B0 D1 E1 C1 F1 C9 83 03 = 6 SHIPS

COIN ON AND EXTRA LIFE @ 1000 + PLAYER SHIPS
B0 D1 E1 C1 F1 C9 08 00 = 3 SHIPS
B0 D1 E1 C1 F1 C9 09 01 = 4 SHIPS
B0 D1 E1 C1 F1 C9 0A 02 = 5 SHIPS
B0 D1 E1 C1 F1 C9 0B 03 = 6 SHIPS

COIN OFF AND EXTRA LIFE @ 1000 + PLAYER SHIPS
B0 D1 E1 C1 F1 C9 88 00 = 3 SHIPS
B0 D1 E1 C1 F1 C9 89 01 = 4 SHIPS
B0 D1 E1 C1 F1 C9 8A 02 = 5 SHIPS
B0 D1 E1 C1 F1 C9 8B 03 = 6 SHIPS


You can also have some credits by default if you wish.  ;D

Change

3A 6D FA FA 6D 3A 19 00 00 00 00 00 00 00 00 00 00 01 00 00 01 74 1F

TO   
                                                                                     
3A 6D FA FA 6D 3A 19 00 00 00 00 00 00 00 00 00 00 01 00 99 01 74 1F

The 99 is the max amount of credits you can have, change that number to what you want.  ;)

Hope some of you find them useful.  ;D


Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Kris on 15:22, 14 June 16
Just test it on real CPC old; very nice and so close from the original one :)
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Gryzor on 11:18, 15 June 16
So much geekiness it makes my heart cry with joy =)
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: alex76gr on 00:01, 28 July 16
I just read that Scramble (Konami) was based on Z80 CPU.
Would it be possible for an emulator just like the Space Invaders (just saying) ?

I can't stand watching almost every 8-bit machine has its own version and not the CPC.
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: CraigsBar on 01:30, 28 July 16
Quote from: alex76gr on 00:01, 28 July 16
I just read that Scramble (Konami) was based on Z80 CPU.
Would it be possible for an emulator just like the Space Invaders (just saying) ?

I can't stand watching almost every 8-bit machine has its own version and not the CPC.
Dual z80 CPU's and dual ay soundchips... OK we have the playcity but not sure about the 'missing' CPU
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: VincentGR on 17:15, 28 July 16
This is my holy grail!!! Wish I could play it on my favorite machine.
Yes, it has 2xZ80 but the second is clocked lower so it might be a sound controller in disguise.
I really don't care if it had no sound, vector or ASCII style , I just want to play it on my CPC  ;D


Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: 40Crisis on 18:50, 19 March 17
Following the release of the Space Invaders Arcade Emulator for Sinclair ZX Spectrum available here:

https://www.worldofspectrum.org/forums/discussion/54108/space-invaders-emulator-for-the-spectrum-128-2-2a-2b-3

I updated the Space Invaders Arcade Emulator for Amstrad CPC with a few fixes:

V1.02:    fixes coming from zx spectrum version (18/03/2017)
      bonus sound at 1000/1500 points now works
      reset sound when using tilt   
      updated shields display
      changes in builder
      fixed a nasty bug causing emulator to hang at startup (black screen)

      

Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Mark_wllms on 17:39, 09 March 24
I tried to run the disk creation tool and it also complains that appack.exe contains a Trojan.
Anyone know if this is true?
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: xesrjb on 18:04, 09 March 24
Quote from: Phantomz on 00:32, 13 June 16
Quote from: CraigsBar on 23:05, 12 June 16@Phantomz (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1308) your remapped controls are awesome. @40Crisis (http://www.cpcwiki.eu/forum/index.php?action=profile;u=951) the emulator is brilliant. Having loved Space Invaders since a kid I always longed for an arcade perfect port and now in 2016 I have it.

@CraigsBar (http://www.cpcwiki.eu/forum/index.php?action=profile;u=482)

You're welcome, glad you like them, I take it you got it to work ok then.  ;D

I've added the following to the instructions.

Change the following too if you don't want the console pause button to move right!

3A 22 55 E6 04  TO  3A 22 55 E6 80
3A 21 55 E6 08  TO  3A 21 55 E6 80
3A 26 55 E6 08  TO  3A 26 55 E6 80

This will change the following;

O = Left    TO  <
P = Right  TO  >
Q = Fire    TO  Z

If you do the above, it will free up P Console Pause Button, so you could use this to insert coins if you wish instead of joystick up or down, if so don't change the following from the above list.

3A 25 55 E6 01  TO  3A 27 55 E6 01
3A 24 55 E6 02  TO  3A 27 55 E6 02

Change the following instead;

3A 25 55 E6 01  TO  3A 21 55 E6 08
3A 24 55 E6 02  TO  3A 21 55 E6 08

I will try...

xesrjb 
Title: Re: Space Invaders Arcade Emulator for Amstrad CPC
Post by: Nich on 10:53, 10 March 24
Quote from: Mark_wllms on 17:39, 09 March 24I tried to run the disk creation tool and it also complains that appack.exe contains a Trojan.
Anyone know if this is true?
I didn't get any such warnings. I believe that appack.exe is the aPLib compressor (https://ibsensoftware.com/download.html).

If you're still worried about running the creation tool, compiled disc images are available from CPC-POWER (https://www.cpc-power.com/index.php?page=detail&onglet=dumps&num=13098&actif=D7CRACK).
Powered by SMFPacks Menu Editor Mod