T-Pau / Joyride

Controller Test Program for Commodore 64.
Other
17 stars 2 forks source link

Port to C16/+4? #4

Open SukkoPera opened 2 weeks ago

SukkoPera commented 2 weeks ago

Hi, thanks for this great tool, I was glad to see it also supports WOJ/WOJ Mini :)

I was wondering if you could port it to the C16/+4. I can't estimate how big of an effort that would take, but I'm asking just in case :).

Thanks anyway!

PS: Maybe you could add links to the WOJ project pages, as I think most people have no idea of what they are!

dillof commented 2 weeks ago

You're welcome, I'm glad you like it.

A C16/Plus4 port is planned. The main challenges are the lack of sprites (I'll have to render the mouse pointer into the character set) and how to present the various ways to connect controllers (directly, via the two user port variants, via a SID card).

Adding links to the list of supported devices is a good idea, I've begun doing that.

SukkoPera commented 2 weeks ago

This is very good news, which honestly I didn't expect! I understand the challenges, make sure to come to Plus4World if you need help of any kind!

I was very surprised to see WheelOfJoy support on the C64. I designed it for the +4 and wasn't sure it would also be usable on that machine. Then I found out about your program by chance, and that was particularly surprising because a different cable is needed on the C64, which I had not even documented! At the same time VICE also added WOJ support on many platforms (which, ironically enough, seems to be OK for the C64/VIC20/CBM-II and broken for the +4!). So what I did was reverse engineer the cabling from VICE and update the docs (not yet published). Very odd combination of things! :)

dillof commented 2 weeks ago

I ordered some of your PCBs a while ago, Wheel of Joy among them. So far, I've only built the cable for the C64. Here's my mapping, based on your documentation and the pinout of the respective user ports:

DB-15 User Port C64 User Port Plus/4 Signal
1, 9 2 2 +5V
2 C B P0
3 D K P1
4 E 4 P2
5 F 5 P3
6 3 3 /RESET
7 10 10 +9V
8, 15 1, 12, A, N 1, 12, A, N GND
10 H 6 P4
11 J 7 P5
12 K J P6
13 L F P7
14 11 11 -9V

I've already written a Plus/4 version of my keyboard test program Anykey, so I have some experience, but if I get stuck, I'll gladly take you up on your offer. Also, if you could promote the program once it's done, that would be great, as I don't know much about the Plus/4 community.

SukkoPera commented 2 weeks ago

Yep, that matches what I reverse engineered from VICE, you can see it here. I guess I could even merge it by now.

As you can see, I have also added a mention of your program, I was really happy to find it :). A +4 version will be a very nice addition, as there is really nothing similar at the moment, which is a real shame. We only have Solder's Testprogramm, which is quite limited!

H-Synergy commented 2 weeks ago

Sorry if I join in here. I have already programmed a game for the WheelofJoy on the Plus/4. I would like to know how and where you do the query on the C64, is it also $FD10 like on the Plus/4?

dillof commented 2 weeks ago

Sorry if I join in here. I have already programmed a game for the WheelofJoy on the Plus/4. I would like to know how and where you do the query on the C64, is it also $FD10 like on the Plus/4?

You can look at wheel_of_joy_top in wheel-of-joy.s

CIA2_PRB = $dd01 ; read/write user port pins CIA2_DDRB = $dd03 ; select which pins are input and which are output