Some Games running on the MEGA65

append delete adtbm

here is a link to the german Forum64, where i have posted some small videos
showing different games running on my MEGA65 setup.
(latest bitstream)

Reply RSS


append delete #1. Kuba Tyszko

nice. did you make the add-on board yourself or buy from someone ?
I'm planning to get the nexys-4 board shortly and wondering if I should reserve time for soldering or just get a ready-made add-on board.

append delete #2. adtbm

you can't buy it, i have made it myself. But since all the plans and schematics are
made available by the M.E.G.A Team, it wasn't to hard. (only time consuming, i.e. getting
the C65 keyboard connector, but if you need the c64 keyboard connector only, it's easier)
see here:
soldering the ATmega onto the board was a pain in the a.. as well.
So i would suggest, plan some time for building.
the only thing i had to do was changing the pcb layout slightly, since the PCB manufacturer
wasn't able to get the MEGA65 logo at the bottom of the PCB. (Some error with to high resolution). So i have glued the MEGA65 logo afterwards onto the board :-)
here is a link to OSHpark, who have done my pcb.
It costs roughly 120USD for 3 boards (3 boards is minimum order)

If you have questions or want more pics, feel free to ask. i am happy to help.

Last word: if you can't wait for the motherboard MEGA is doing at the moment
and want to hop directly into the project, make your own DM65pic board.
Otherwise wait a little longer for news from M.E.G.A !

append delete #3. Kuba Tyszko

Just ordered a PCB's for mine, how do I go about searching for the C65 keyboard connector ?
In Eagle schematics' partlist it's named "C65_MOLEX_KEYB", do you have the part number you got ?
do you also have the pitch and trace size of the C65 ribbon cable ?

append delete #4. adtbm

Hi Kuba,

That is the exact one, but i wasn't able to get it from Molex:

But with the part number, i was able to find it on the net.

Pitch size and so, you can find in the PDF from the above Molex link

If you don't have a C65 Keyboard, you don't need it at all, then the C64 Keyboard connector is sufficent.

One last hint: (not sure how good your soldering skills are) Better order 2 ATmegas directly.
I have needed two attempts to get the ATmega soldered properly to the PCB...

append delete #5. adtbm

One more tipp:
The inductor L1 is also not given, after checking back, with the M.E.G.A Team they told me,
that the Filter Conductor they were using is this one: Würth WE-CBF - 742 792 0415

Any more questions, feel free to ask !

And for all the other ones: If you ONLY need to connect a C64 Keyboard and Joysticks,
use the Keyrah v2 board. It should work.
The Main purpose of the Widget board and difference to the Keyrah is, to connect the C65 Keyboard and the Xpansion slot. (I think the Expansion slot implementation was not completed in the software, after MEGA decided to build their own Mega65 mainboard).
So i have built the Widgetboard only because i wanted to connect my original C65 keyboard.

append delete #6. Kuba Tyszko

Thanks for the tips, actually I'm pretty confident with my soldering, I've soldered a few Minimig's and the FPGA chip there has even more pins (208 vs 176).

I do have keyrah v2 on the way, but I'm a tad confused, I thought MEGA65 (due to nexys 4 boards limitations) only supports one device on the USB bus, do joystick ports from keyrah actually work on MEGA this way ? (can someone confirm that?)

append delete #7. adtbm

Good question !

That's something i don't know either, but i am also waiting for my Keyrah v2.
So we will see soon.

append delete #8. Kuba Tyszko

It seems that keyrah_v2 maps joystick actions to keyboard strokes, I'm not sure which keys (I do suspect that one of the joystick would be mapped to arrows) and whether that is configurable.

If that's true then MEGA65 won't see those joysticks as actual joysticks ...

append delete #9. adtbm

I have contacted the Keyrah v2 Developer, since i know him from the german
forum64 website, i've told him, what we would like to use the keyrah for
and asked him if this is possible. I hope he can clarify.

I have asked him, if the Keyrah simulates in c64 mode the following keystrokes, when moving the Joystick:


NONE 255 127
1 UP 254 (1) 126 (C= & F3)
2 DOWN 253 (LEFT ARROW) 125 (C= & S)
3 LEFT 251 (CTRL) 123 (C= & F)
4 RIGHT 247 (2) 119 (C= & H)
6 FIRE 239 (SPACEBAR) 111 (C= & K)

append delete #10. adtbm

Controlport 1

NONE: 255
1 UP: 254 (1)
3 LEFT: 251 (CTRL)
4 RIGHT: 247 (2)

Controlport 2


NONE: 127
1 UP: 126 (C= & F3)
2 DOWN: 125 (C= & S)
3 LEFT: 123 (C= & F)
4 RIGHT: 119 (C= & H)
6 FIRE: 111 (C= & K)

append delete #11. Kuba Tyszko

Great!, clear and to the point!.

So basically the only way to support joystick via keyrah as a proper joystick would be to modify keyrah's firmware to supply different (unused in C64/C64) keycodes and have MEGA interpret those keycodes as joystick.

Thank you.

append delete #12. adtbm

This is the keymapping of the original C64.
If you run a game on the c64 and it says "Push fire on joystick in port 2"
By pressing "C=" & "K" the game would start.
the joystick control lines of both Control ports are directly connected to CIA1 6526. same connections as the keyboard.

The paddles wonn't work, because they were connected to the SID.

So as long as the CIA emulation works, the MEGA will interpret those inputs as joystick.
Voila, joysticks would work.
(At least, theoretically ;-) )

append delete #13. adtbm

Hi Kuba,

unfortunately the response, i have received was not very helpful.

So after i did some research, i think, i will mod my Keyrah a little bit.
If i understand this plan correctly:

I only need to switch the Keyrah to C64 (8Bit) mode, cut the original controlport traces on the Keyrah and manually wire the controlport cables (JoyA 0-3 / JoyB 0-3 and BtnA / BtnB / GND) to the relevant solder points at the keyboard connector, as given in the plan and it should work !

Here is a quote from the Keyrah description:

Switch settings:
For 8-bit keyboards, the switch chooses between two key mappings: „down“ for emulators like Vice (C64) and Yape (plus/4, C16, C116), and the „middle“ position for everyday use. The emulator mapping is as easy as it can get: Every keypress will cause the exact thing that you'd expect the original machine to do when you press that key. For everyday use, the exact key mapping is described further down.

from the website here:

And since we know, that the keyboard is working, this mod should get the Joysticks working too.
(If i don't make a thinking error, but it doesn't look like...)

I'll let you know, as soon as i've done it...

Here is the Youtube video from Paul, using the Nexys with Keyrah:

append delete #14. adtbm

If we leave Pin 7 on both controllports we probably even have 5V+
(If not, i'll borrow it from the USB connector...)
so Joysticks with Autofire should work, also electronic Joyportswitcher...

...we'll see... :-)

Only thing that won't work are Paddles and Lightpen, but i can live without it.....

append delete #15. dropnine

Yes, the keyrah v2 joy ports work perfectly fine for both Mega65 and c64 mode for joysticks. With the Keyrah in CBM mode (first click of the "power" switch), they function as expected; printing the contents of 56320 & 56321 with expected results and the Mega65 joy(x) works the same. While in pc mode (pressing the switch all the way to the top) the joy ports both work as cursor controls. I'm using the latest bitstream & the 910111.bin binaries.


append delete #16. dropnine

I forgot to mention 1581 d81 game conversions are found here:

append delete #17. adtbm

@dropnine: Great news ! So no modding required. Excellent !
And thanks for the .d81 conversion link

append delete #18. Ordyne

Anyone want to sell a spare blank pcb if they have one spare? Save having to each of us get 3pcs

append delete #19. adtbm

@Ordyne: I have one blank pcb left. I would like to have: 30€ (incl. p&p). If you want it, drop me an email with your adress to:

append delete #20. SvOlli

I noticed that the Keyrah V2 has some serious ghosting issues. We were trying to play Mario Bros with 2 players and it was possible to block the second player from going left when the first player did something like "move up+right and pressing fire" (it wasn't the exact problem, but is was something like that...)

append delete #21. Kuba Tyszko

This must have something to do with how the chip on keyrah deals with ghosting (since the c64 keyboard doesn't have any diodes).
since c64 itself has no support for ghosting at all, and assuming that the way to expose that issue doesn't show on the actual hardware - would most likely be caused by how the keyrah scans the keyboard matrix (+joysticks).
Looking at the schematic, I think the 555/556 timer might be generating the frequency - that should be easy to compare with the rate at which keyrah does it...

append delete #22. Kuba Tyszko

I will have 3 boards for sale available shortly (next week) - $20 each plus shipping

append delete #23. dropnine

I tested mine out again, and it seems to work quite well without any problems. I don't recall having problems with it before, either -- it's about a year now. I'll watch out for any issues if there are any. Cheers

append delete #24. adtbm

My Keyrah v2 arrived yesterday and it's working great.
I have not been able to reproduce the ghosting effect mentioned further above,
but probably just because i don't have a second player atm i could test it with.

here is a quick video:


(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Deft, gardners, MARCOM