Attack UFO - Arcade game that uses the 6560

Other Computers and Game Systems

Moderator: Moderators

lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Attack UFO - Arcade game that uses the 6560

Post by lance.ewing »

I discovered the previous topic below this evening when I recalled it being mentioned a few times in passing that the 6560 was used in an arcade game machine, and so I decided to do a bit of research.

http://sleepingelephant.com/ipw-web/bul ... f=1&t=2236

The main reason I started this topic is because I discovered the tweet below from a couple of months ago:

https://twitter.com/plgDavid/status/915749839723466753

How exciting. Apparently this episode 2 of Collector's Quest mentions something to do with Attack UFO, and I'm assuming it might show the original game machine:

https://noco.tv/emission/35016/nolife/c ... s-quest/02

Unfortunately it looks like we need to subscribe and pay to watch it, and my French is virtually non-existent, so not much point in me watching it other than for the visuals. But I thought there would be people in the forums here that would be very interested in this. Hmmm, wonder if it might show the internals of the machine.

Another thing I discovered elsewhere was a photo of the motherboard for this game:

http://www.gamesdatabase.org/media/arca ... attack-ufo

Quite a compact little board. It's not a particularly clear photo though. I guess we've got the 8 ROM chips, a 6502, a 6560, and according to the MAME emulator source code, the other chip has currently been identified by them as a 6821 PIA. Hard to say whether that was the actual chip on the motherboard. It could have been a MOS equivalent, which given the other MOS chips on the board, might be more likely I guess.

https://github.com/mamedev/mame/blob/ma ... tckufo.cpp
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: Attack UFO - Arcade game that uses the 6560

Post by lance.ewing »

The problem with something like this is that I can't stop thinking about it.

I found a couple more web sites that host the image of the PCB. I thought I might add one below so that it is preserved in this topic:
attack_ufo.jpg
I also found some interesting comments in older versions of the MAME driver file for Attack UFO (not in the latest version):

https://github.com/mamedev/mame/blob/7c ... tckufo.cpp

It appears to have information about the layout of the PCB:

Code: Select all

2  1   2114 2114 2114 2114 2114
8  7  6  5   4  3               40pin IC "C"
53354    40pin IC "B" 14.318MHz 40pin IC "A"
                                SW
If you compare the above numbers with the PCB image above, you'll notice that the numbers 2 1 8 7 6 5 4 3 match the positions of the ROM chips and the labels on them. I don't think whoever typed this information in the source code had access to the PCB itself and may only have had the same image to go by. The reason I think this is because it has omitted a number of chips and they're not sure about the identity of the IO chip. But the chips that have been included are interesting. The five 2114 chips are what I would have guessed for those five chips given their number of pins and shape. The colour RAM only needs 4-bit RAM, so that would be one of them. The other four would make up an additional 2 K. The mame driver file puts 1K between 0x1c00 and 0x1fff, and the rest starting at 0x0000. I think I'll have to dig in to the mame code a bit more to work out where it has placed the colour RAM.

The Mitsubishi logo is recognisable on the 53354 chip. Not sure how somebody managed to read the number. From a quick Google, not a lot of information about this chip, but there was a discussion about it being used in place of a 74154, so must be functionally equivalent, i.e. a 4-line to 16-line decoder/demultiplexer. Could it be how it selects the different chips? There seems to be only 16K of address space. All chips seemed to be mapped to 1K boundaries.

From looking a bit closer at the 40pin chips, I'd say that what the source code comment calls the "B" chip is the 6560 (due to what looks like video circuitry near the luminance and chrominance pins), the "A" chip is the IO chip (due to the proximity of the DIP switches), and the "C" chip is the 6502 (through a process of elimination).
User avatar
eslapion
ultimate expander
Posts: 5458
Joined: Fri Jun 23, 2006 7:50 pm
Location: Canada
Occupation: 8bit addict

Re: Attack UFO - Arcade game that uses the 6560

Post by eslapion »

lance.ewing wrote:Unfortunately it looks like we need to subscribe and pay to watch it, and my French is virtually non-existent, so not much point in me watching it other than for the visuals. But I thought there would be people in the forums here that would be very interested in this.
I am! It so happens I was born in a french speaking environment.

However, it has to wait 'til after the WoC.
Be normal.
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: Attack UFO - Arcade game that uses the 6560

Post by lance.ewing »

eslapion wrote: I am! It so happens I was born in a french speaking environment.

However, it has to wait 'til after the WoC.
I look forward to hearing back with regards to what you might discover by watching this video. I'm really hoping that it is the Ryoto Electric "Attack UFO" game that is featured and not the Taito "Attack UFO" from 1974. In my online searches, I've found a bit of information about the Taito game from 1974 that happens to have the same name. Some websites confuse the two games and have put an image of the Taito upright arcade unit claiming it is the Ryoto Electric Attack UFO game from 1980. The 1974 Taito game was made purely from discrete logic and is a black & white game. The Ryoto Electric game is the one with the 6560 VIC chip.

Edit: If this video mentions the name of the person who owns the Attack UFO unit featured, then could you please take a note of the name? It would be great to see if we could make contact with the owner to get some more detailed photos of the PCB.
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: Attack UFO - Arcade game that uses the 6560

Post by lance.ewing »

lance.ewing wrote: The Mitsubishi logo is recognisable on the 53354 chip. Not sure how somebody managed to read the number. From a quick Google, not a lot of information about this chip
In general, it seems to be difficult to find information on Mitsubishi chips. I think I can make out the Mitsubishi logo on at least four of the chips on the PCB. After searching for a bit, I found the following list of Mitsubishi logic chips that also happens to list next to each the equivalent 7400 series or CMOS chip:

http://www.ceitron.com/semi/ceimitsubishi.html#digital

Apart from the M53354P, the other three Mitsubishi chips appear to be 14-pin chips, so are probably simple logic gate chips.

This PCB would need some tri-state bus transceivers for the address bus, but if it has them, then they aren't 8-bit bus transceiver chips because none of the remaining unidentified chips have enough pins. Perhaps we have a number of 4-bit chips that service that purpose. Hard to say.

I've located the eight ROM images online and I'm now very tempted to try emulating this myself so I can do further diagnostics on how the game is using its memory.
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: Attack UFO - Arcade game that uses the 6560

Post by lance.ewing »

I've just noticed some very interesting code within the MAME implementation of the 6560/6561 VIC chip:

https://github.com/mamedev/mame/blob/ma ... os6560.cpp

The interesting bits of the code are the Attack UFO specific checks and differences in behaviour when its the Attack UFO version of the 6560. I'm not sure if they've actually confirmed these differences or only guessing at them. The following bit might be the most interesting difference:

Code: Select all

			attr = (read_colorram((m_videoaddr + offs) & 0x3fff)) & 0xf;

			if (m_variant == TYPE_ATTACK_UFO)
			{
				/* the mos6560 variant used in attckufo only has only one draw mode */
				m_mono[1] = attr;
				draw_character(ybegin, yend, ch, yoff, xoff, m_mono);
			}
A very strong suggestion there that the Attack UFO version of the 6560 chip supported 16 foreground colours instead of a multi-colour mode. You'll notice that it reads the 4-bit value from colour RAM and uses that directly without masking out the top bit.

The TODOs at the top of the source file say:

Code: Select all

- investigate attckufo chip features (no invert mode, no multicolor, 16 col chars)
That suggests that they are not sure of this behaviour, but why would they implement these differences unless it was for a reason? I should see if I can put a few questions to the original coder of the Attack UFO MAME driver to see what he knows about this. I might take a look at the youtube videos of MAME's emulation of this game to see if it looks like its using 16 foreground colours and decide whether any appearances of the lighter colours would make sense if they were multi-colour instead.

Edit: I'm putting my hopes in that Collector's Quest video featuring the game itself running. If it does, then it might answer some questions about colours.
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: Attack UFO - Arcade game that uses the 6560

Post by groepaz »

is a ROM dump around for this? would be a fun hacking project (to try making it run on the vic20) :)
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: Attack UFO - Arcade game that uses the 6560

Post by lance.ewing »

Yes, I found them in a few places. I think it was emuparadise that I ended up grabbing them from. Eight 1K ROM files. It would be great if you could hack it to make it work on the VIC 20.
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: Attack UFO - Arcade game that uses the 6560

Post by groepaz »

found it :)

is it for certain that it uses a 6502 and not 65C02 or other derivate? if its really 6502, then there is quite a bit of "illegal" opcode usage =P
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: Attack UFO - Arcade game that uses the 6560

Post by lance.ewing »

I guess nothing is for certain at this point, but MAME does include these for Attack UFO:

Code: Select all

#include "cpu/m6502/m6502.h"
#include "machine/6821pia.h"
#include "sound/mos6560.h"
which suggests it is a 6502.

They do appear to have other derivatives available for use:

https://github.com/mamedev/mame/tree/ma ... /cpu/m6502

but they've gone for the m6502 and that apparently seems to work for them.

The m6502.h file does appear to suggest support for the undocumented 6502 opcodes:

https://github.com/mamedev/mame/blob/ma ... 502.h#L236

It seems strange that a game like this from 1980 would use a lot of undocumented opcodes though.
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: Attack UFO - Arcade game that uses the 6560

Post by lance.ewing »

Posting an image here of the game (probably from MAME's emulation) for discussion:
attack_ufo_screen.png
attack_ufo_screen.png (985 Bytes) Viewed 5485 times
The presence of the light blue barriers at the bottom does seem to suggest 16 foreground colours. The pixel size is hi-res, which would normally allow only for the first 8 colours. If those barriers were in multi-colour mode instead, they'd look a bit out of place. So its looking like it really did have 16 foreground colours.
groepaz
Vic 20 Scientist
Posts: 1180
Joined: Wed Aug 25, 2010 5:30 pm

Re: Attack UFO - Arcade game that uses the 6560

Post by groepaz »

i was interpreting some things wrong :) this game uses some really unusual programming techniques (which unfortunately will make it quite some work to patch :/)

i have it "running" now ... in the sense that i can start the code, it runs and doesnt crash, and i can see the rendered screen in memory. unfortunately the memory layout this game uses is totally different to what the vic20 implements, and the screen/color/charset data is located at places that cant just be mapped, so lots of code must be patched.

edit: got some display now. unfortunately this game uses a rotated screen :/

Image

enough for tonite... not sure if i bother to go further, its going to be a lot of work for a game that can only be played by rotating your monitor =P

edit++: couldn't let it go... almost working, even plays sound :)

Image Image

now zzzzzZZZZ
I'm just a Software Guy who has no Idea how the Hardware works. Don't listen to me.
User avatar
highinfidelity
Vic 20 Nerd
Posts: 644
Joined: Thu Jul 28, 2011 2:34 am
Website: http://www.hirtel.it
Location: Torino, Italy.

Re: Attack UFO - Arcade game that uses the 6560

Post by highinfidelity »

How cool!!! 8) Now this is what I call "promising"!!!
GOD is REAL. Unless declared DOUBLE PRECISION.
User avatar
tokra
Vic 20 Scientist
Posts: 1120
Joined: Tue Apr 27, 2010 5:32 pm
Location: Scheessel, Germany

Re: Attack UFO - Arcade game that uses the 6560

Post by tokra »

Is there an option in VICE to rotate the display? :wink:
Last edited by tokra on Fri Dec 08, 2017 5:51 pm, edited 1 time in total.
lance.ewing
Vic 20 Afficionado
Posts: 413
Joined: Sat Nov 10, 2012 3:19 pm
Website: https://sites.google.com/site/mos6561vic/

Re: Attack UFO - Arcade game that uses the 6560

Post by lance.ewing »

groepaz wrote: edit: got some display now. unfortunately this game uses a rotated screen :/
Wow! Good work! You've done a lot in a small amount of time.
groepaz wrote: enough for tonite... not sure if i bother to go further, its going to be a lot of work for a game that can only be played by rotating your monitor =P
How much work would it be to rotate everything? Quite significant I'd imagine. We'd need to modify all the character bitmaps so they're rotated, change the screen matrix dimensions, then change the machine code so everything is placed differently and moves in a different direction. Lots of work but sounds possible.
groepaz wrote: edit++: couldn't let it go... almost working, even plays sound :)
I know what you mean. I can't stop thinking about it as well.

Did you get the controls working as well?
Post Reply