Author Topic: Space Invaders Arcade Emulator for Amstrad CPC  (Read 6470 times)

0 Members and 1 Guest are viewing this topic.

Offline 40Crisis

  • CPC464
  • **
  • Posts: 41
  • Liked: 123
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.

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 2.927
  • Country: fr
    • ?area=showdonations;u=4
    • Cent Pour Cent [dot net]
  • Liked: 2049
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #1 on: 16: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)
Unregistered from CPCwiki forum.

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 2.927
  • Country: fr
    • ?area=showdonations;u=4
    • Cent Pour Cent [dot net]
  • Liked: 2049
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #2 on: 18: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)
Unregistered from CPCwiki forum.

Offline Token

  • 464 Plus
  • *****
  • Posts: 331
  • Country: fr
  • Liked: 115
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #3 on: 22:39, 11 June 16 »
Impressive work, played it on my GT-64. Looks and play awesome. Thank you!  :D


Offline TotO

  • 6128 Plus
  • ******
  • Posts: 2.927
  • Country: fr
    • ?area=showdonations;u=4
    • Cent Pour Cent [dot net]
  • Liked: 2049
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #4 on: 22:53, 11 June 16 »
Yes, it should be more impressive on it!!!  :)
Unregistered from CPCwiki forum.

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1972
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #5 on: 00:33, 12 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]
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #6 on: 00:40, 12 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...
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.153
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1097
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #7 on: 00:57, 12 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.
« Last Edit: 01:38, 12 June 16 by CraigsBar »

Offline 40Crisis

  • CPC464
  • **
  • Posts: 41
  • Liked: 123
Space Invaders Arcade Emulator for Amstrad CPC
« Reply #8 on: 01:24, 12 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.

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.153
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1097
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #9 on: 01:35, 12 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 are you reading this mate?

Offline Tolkin

  • CPC664
  • ***
  • Posts: 84
  • Liked: 25
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #10 on: 02:18, 12 June 16 »
Hy, tried it and it is very playable and looks good with the "Overlay" Emulation.
Really cool!
Thanks for this  :)

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.072
  • Country: gb
  • Liked: 1465
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #11 on: 05:16, 12 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 are you reading this mate?

@CraigsBar

I requested a builder without compression, @40Crisis 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
« Last Edit: 16:58, 12 June 16 by Phantomz »

Offline 40Crisis

  • CPC464
  • **
  • Posts: 41
  • Liked: 123
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #12 on: 10:13, 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 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
« Last Edit: 10:32, 12 June 16 by 40Crisis »

Offline alex76gr

  • CPC664
  • ***
  • Posts: 133
  • Country: gr
  • Liked: 81
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #13 on: 13:16, 12 June 16 »
Thank you so much for this. :)
I still believe that i got my myopia from the green GT-65 monitor, but i can't prove it! :)

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #14 on: 14:19, 12 June 16 »
Managed to play it.
Really nice and good work!
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Offline Puresox

  • 6128 Plus
  • ******
  • Posts: 1.290
  • Country: 00
  • Liked: 244
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #15 on: 14:55, 12 June 16 »
Any vids of this about as yet?
 Interested in how the speed compares .

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.072
  • Country: gb
  • Liked: 1465
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #16 on: 16:52, 12 June 16 »
As requested, Here's the builder without compression

@40Crisis    Thanks for doing that, GX4000 owners can put my work to use now, Cheers  ;D

@CraigsBar  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 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.

« Last Edit: 19:59, 13 June 16 by Phantomz »

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.153
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1097
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #17 on: 18: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 :)




Offline VincentGR

  • 6128 Plus
  • ******
  • Posts: 725
  • Country: gr
    • Parts from the past.
  • Liked: 299
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #18 on: 18:52, 12 June 16 »
Any vids of this about as yet?
 Interested in how the speed compares .

[youtube]https://www.youtube.com/watch?v=VXlKGedOTm4[/youtube]

Offline Phantomz

  • 6128 Plus
  • ******
  • Posts: 1.072
  • Country: gb
  • Liked: 1465
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #19 on: 18:56, 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

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.153
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1097
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #20 on: 19: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.

Offline Puresox

  • 6128 Plus
  • ******
  • Posts: 1.290
  • Country: 00
  • Liked: 244
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #21 on: 21: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

Offline 40Crisis

  • CPC464
  • **
  • Posts: 41
  • Liked: 123
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #22 on: 21:35, 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.
« Last Edit: 21:38, 12 June 16 by 40Crisis »

Offline VincentGR

  • 6128 Plus
  • ******
  • Posts: 725
  • Country: gr
    • Parts from the past.
  • Liked: 299
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #23 on: 22:47, 12 June 16 »
Gentlemen, direct comparison.
The speed is amazing!!!

[youtube]https://www.youtube.com/watch?v=7zDuykRTqAg[/youtube]

Offline CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.153
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 1097
Re: Space Invaders Arcade Emulator for Amstrad CPC
« Reply #24 on: 01:05, 13 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.