Welcome, Guest. Please login or register.

Author Topic: Arcade game "1943 : the battle of midway" running on an FPGA!  (Read 10069 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Arcade game "1943 : the battle of midway" running on an FPGA!
« on: September 13, 2008, 01:37:07 AM »
Hello,

It is a little bit OT but, it can be interesting for Minimig owners.
I have ported the coin-op game from Capcom to an FPGA.
Check this little video:
http://www.youtube.com/watch?v=9UuDf9zZqCg

The game fits in 3500 LEs (I did not write the sound part yet).
It is displayed on a VGA screen at 1280x1024, 60Hz.
The internal architecture is built on 16-bit bus running at 24 MHz (384 clocks per scanline, 1048 lines per frame) with a 8-channel DMA scheduler :
- the main Z80
- the audio Z80 (not used yet)
- the scroll #1 tilemap
- the scroll #2 tilemap
- the scroll #1 graphics
- the scroll #2 graphics
- the sprite graphics
- the character graphics
All the game ROMs (864KB) are stored in an external SSRAM and are accessed through DMA.

If the Minimig HW is fitted with 10ns SRAM, it is possible to run this game.

Regards,

Frederic
 

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Re: Arcade game "1943 : the battle of midway" running on an FPGA!
« Reply #1 on: September 13, 2008, 05:59:05 AM »
Quote

Darrin wrote:
Nice work.  So, is the standard aCube Minimig fitted with 10ns SRAM?

Unfortunately no, it has 55ns SRAM.
I think it may be possible to optimize the DMAs to make them run on a 16 or 12 MHz bus :
One cycle out of 4 is given to the main Z80 and one cycle out of 8 to the audio Z80. But, these two Z80 use 8 bits out of the 16 bits read. With a simple caching of the second byte fetched, almost 50% of the Z80 fetch cycles can be saved.
The FPGA implementation can display 128 sprites per scanline, which will never happen (even the NeoGeo displays a maximum of 96 sprites per scanline). A lot of DMA slots are wasted here. I think I might be able to set the limit to 32 or 48 sprites.

Quote

I must admit to liking 1943.  The Amiga version of 1943 runs well, but a pure arcade version would be very nice.

Honestly, I was pretty disapointed by the Amiga version.

The FPGA version seems to be smoother than the arcade : there is no slow down when a lot of sprites are on the screen. This is because I made the main Z80 working at 24 MHz instead of 6 MHz. Just the instruction fetches are limited to 6 MHz. The animation is anyway synchronized with the VBLANK interrupt so the extra speedup on the Z80 does not turn the game into an implayable one.

Now, I am working on a scale2x algorithm to improve the graphics.

Regards,

Frederic
 

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Re: Arcade game "1943 : the battle of midway" running on an FPGA!
« Reply #2 on: September 16, 2008, 03:31:31 AM »
Quote

Illuwatar wrote:
I don't think the address line order actually matters in this case. Yes - you will end up, reading a different memory cell compared to the correct RAM type, but you will always end up at the same cell. SRAM does not care about order as long as you are inside the address range.

Illuwatar is completely right about address lines ordering.
Some SRAM manufacturer like Cypress just specifies A0 and A1 locations in their SSRAM datasheet (because of burst mode), the other address pins are just named "A".
The same remark is valid for the data lines (as long as you keep the data lines in the same byte group for x16 and x32 chips)

Regards,

Frederic
 

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Re: Arcade game "1943 : the battle of midway" running on an FPGA!
« Reply #3 on: September 16, 2008, 03:40:00 AM »
Quote

jensl wrote:
Haha, nice trick with the flat-iron.
I use every day the hot air from Leister.
http://www.klappenbach.de/html/hot_jet_s.html

I will order some 10ns sram from digikey.

I will report the results next week.:)

You won't notice any speed improvement with Minimig.
The DMA scheduler has to be rewritten for that.
That would be a nice project : 57 MHz bus speed, 4 times the AGA speed...

Regards,

Frederic
 

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Re: Arcade game "1943 : the battle of midway" running on an FPGA!
« Reply #4 on: September 16, 2008, 03:42:08 AM »
Quote

whiteb wrote:
Would the Minimig (in Amiga mode) benefit from faster ram over the Ram used already ?  And pin to pin compatibility ? compatibility ?

Yes, if the DMA scheduler is rewritten.

Quote

How is it going to affect the game, with the 68000 Hardwired on the board ?

The 68000 will be disabled.
 

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Re: Arcade game "1943 : the battle of midway" running on an FPGA!
« Reply #5 on: September 16, 2008, 03:50:38 AM »
Quote

jensl wrote:

Do you think games with 68k and z80
are possible on the minimig ? Maybe the cps1 and cps2 games.

Jens

I though about these games too.
I do not know if the Spartan is big enough.
I am working only with Altera parts. In my case, the EP3C16 is only 24% full and the fmax is >50 MHz so I have plenty of room for the audio Z80 or a 68000 (for a CPS1/2 or also a system 16).
I am thinking about the NeoGeo or the PC Engine.
The only issue with the NeoGeo is the size of the game, I might need to buy a DE2-70 and upgrade it to 128MB of SDRAM and 8MB of SSRAM.

Regards,

Frederic
 

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Re: Arcade game "1943 : the battle of midway" running on an FPGA!
« Reply #6 on: September 16, 2008, 05:56:48 AM »
UPDATE:
I have implemented a first version of Scale2X.
Now, the design takes 4900 LEs.
It is because I have a Scale2X algorithm for each layers (there are five layers on this game), it may be a little bit overkill.
I have to tell you : the Scale2X results are quite amazing !

I will post a new video soon.

Regards,

Frederic
 

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Re: Arcade game "1943 : the battle of midway" running on an FPGA!
« Reply #7 on: September 16, 2008, 01:07:28 PM »
Quote

whiteb wrote:

But to justify the cost, are we talking about more games than just 1943 being able to be run ?


Currently, I can easily run the 3 versions of 1943 and Gunsmoke.
With few modification, I can run 1942 and Commando.

Then, the next step will be one of these : CPS1, CPS2, System16, (S)NES, MegaDrive, NeoGeo, PC Engine.

Regards,

Frederic
 

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Re: Arcade game "1943 : the battle of midway" running on an FPGA!
« Reply #8 on: September 17, 2008, 01:07:12 PM »
Hello,

I have posted a new video on youtube with Scale2X algorithm. Unfortunately, the quality of youtube video sucks, so you cannot really see the difference.
http://www.youtube.com/watch?v=c39E5lhOPTM
Now, I need to take care of the sound chip : the YM2203. It won't be so easy.
I have checked which game shares the same 1943 hardware, there are four :
- 1943 Kai
- Commando
- Gunsmoke
- Black Tiger

Regards,

Frederic
 

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Re: Arcade game "1943 : the battle of midway" running on an FPGA!
« Reply #9 on: September 20, 2008, 09:41:04 PM »
Quote

jensl wrote:
Side Arms should also share the Commando Board.:)
http://www.system16.com/hardware.php?id=788

Jens

Right, I forgot this one.

Anyway, every game are different enough to be obliged to have a different FPGA configuration for each.
It is true even for 1943 and 1943kai, because of a slightly different color palette.

Moreover, the DMA engine also changes if the game is in "portrait" or "landscape" mode.

Regards,

Frederic
 

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Re: Arcade game "1943 : the battle of midway" running on an FPGA!
« Reply #10 on: September 25, 2008, 05:34:38 AM »
Hello Jens,

can you give us the Guru number ?
Is it with KickStart 1.3 ?

Regards,

Frederic
 

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Re: Arcade game "1943 : the battle of midway" running on an FPGA!
« Reply #11 on: December 17, 2013, 10:00:56 PM »
Quote from: Hattig;754510
Nice work.

What are the differences between this implementation and the actual arcade hardware? Did that have a 16-bit bus?

I presume that the 1280x1024 VGA output is not generated by the game, but by some form of scan doubler/quadrupler, capturing the simulated game video hardware's output?  I guess adding Scale2x, etc, algorithms in hardware to this module doesn't touch the arcade game hardware at all, and can be re-used for other games in the future?

Hello,

it is funny to see this thread resurfacing after 5 years...
IIRC, the original HW outputs a 256 x 192 screen. The Scale2X algorithm increases the resolution to 512 x 384. It is then scandoubled to 1024 x 768 (actually 768 x 1024 since it is rotated by 90deg.)
The core can execute few more games like 1943 Kai, Gun smoke, Sidearms, Commando and Black tiger.
The sound is still missing but recently, I started working on FM synth yamaha chip core.
Regards,
Frederic
« Last Edit: December 22, 2013, 04:09:14 PM by FrenchShark »
 

Offline FrenchSharkTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2004
  • Posts: 181
    • Show all replies
    • http://www.arcaderetrogaming.com
Re: Arcade game "1943 : the battle of midway" running on an FPGA!
« Reply #12 on: December 18, 2013, 07:34:54 AM »
Quote from: amiman99;754612
@FrenchShark
Can these games be ported to MCC-216?


This is planned.
The problem is I wrote that stuff 5 years ago and used a SSRAM controller.

Regards,

Frederic