News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Space Invaders Arcade Emulator for Amstrad CPC

Started by 40Crisis, 13:24, 11 June 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

40Crisis

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.

TotO

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)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

TotO

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)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Token

Impressive work, played it on my GT-64. Looks and play awesome. Thank you!  :D


TotO

Yes, it should be more impressive on it!!!  :)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

TFM

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]
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Devilmarkus

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

CraigsBar

#7
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.
IRC:  #Retro4All on Freenode

40Crisis

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.

CraigsBar

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 are you reading this mate?
IRC:  #Retro4All on Freenode

Tolkin

Hy, tried it and it is very playable and looks good with the "Overlay" Emulation.
Really cool!
Thanks for this  :)

Phantomz

#11
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 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

40Crisis

#12
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 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

alex76gr

I still believe that i got my myopia from the green GT-65 monitor, but i can't prove it! :)

Devilmarkus

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

Puresox

Any vids of this about as yet?
Interested in how the speed compares .

Phantomz

#16
Quote from: 40Crisis on 08:13, 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.


CraigsBar

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 :)



IRC:  #Retro4All on Freenode

VincentGR

Quote from: Puresox on 12:55, 12 June 16
Any vids of this about as yet?
Interested in how the speed compares .


Phantomz

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

CraigsBar

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.
IRC:  #Retro4All on Freenode

Puresox

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

40Crisis

#22
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.

VincentGR

Gentlemen, direct comparison.
The speed is amazing!!!


CraigsBar

@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.
IRC:  #Retro4All on Freenode

Powered by SMFPacks Menu Editor Mod