Page 3 of 4
PS/2 / USB discussion (split from What's the state of play with serial port support?)
Posted: Wed Aug 26, 2020 11:21 pm
by Perifractic
13 minutes ago, martinot said:
I find it very strange for the X16, as a (spiritual) model in the Commodore history line of computers, to not have DE-9 ports build in. A real missed opportunity IMHO.
Have you read the reasoning in the
FAQ and does that change your opinion?
PS/2 / USB discussion (split from What's the state of play with serial port support?)
Posted: Wed Aug 26, 2020 11:43 pm
by BruceMcF
26 minutes ago, martinot said:
I find it very strange for the X16, as a (spiritual) model in the Commodore history line of computers, to not have DE-9 ports build in. A real missed opportunity IMHO.
An opportunity to what, exactly? To have games limited to four directions and one fire button, and lose 5-6 out of 14 GPIO from the User Port?
That's mostly the opportunity to lose game developers for the CX16, because once you've gotten used to developing for a controller with an adequate number of inputs, going back to the Atari joystick with single fire button is very constraining.
PS/2 / USB discussion (split from What's the state of play with serial port support?)
Posted: Thu Aug 27, 2020 3:26 am
by rje
On 7/24/2020 at 5:53 PM, TomXP411 said:
Correct - the box to request the 2.5 firmware is already checked; IIRC, you can also choose to check the 3.0 firmware, with the knowledge that you gain more programability but lose the PS/2 protocol.
I didn't realize that keyboards had to have dual control firmware to handle PS/2 + USB. Learn something new every day.
I've got one of the X16 WASD keyboards, and I love it, by the way. I use it every day for work, and non-work, and X16 hacking. Just icing on the cake that it works in both modes. With Cherry switches I guess it will last for the rest of my life.
4 hours ago, martinot said:
I find it very strange for the X16, as a (spiritual) model in the Commodore history line of computers, to not have DE-9 ports build in. A real missed opportunity IMHO.
I found it a little worrisome, because I *already know* how to read the C64's joystick ports -- heck, I remember that they're at $DC00 and $DC01, and I haven't programmed for them in 34 years.
But, I understand the argument for MOAR BUTTONS, and I think that opens up interesting stuff you can do, so, OK.
I'm also glad that there are pin headers for an additional two controllers, but that's just me remembering M.U.L.E. Hmm, there's another game I want to write for the X16. I should have a list.
PS/2 / USB discussion (split from What's the state of play with serial port support?)
Posted: Thu Aug 27, 2020 4:59 am
by StephenHorn
59 minutes ago, rje said:
I found it a little worrisome, because I *already know* how to read the C64's joystick ports -- heck, I remember that they're at $DC00 and $DC01, and I haven't programmed for them in 34 years.
The new interface is to jsr $FF53 to poll the controllers, followed by jsr $ff56 with the accumulator set to 0 or 1 (to select which controller to read). This will put the state of the joystick into the accumulator, and the x and y registers. See also:
Joystick.
PS/2 / USB discussion (split from What's the state of play with serial port support?)
Posted: Thu Aug 27, 2020 12:45 pm
by Michael Steil
7 hours ago, StephenHorn said:
The new interface is to jsr $FF53 to poll the controllers, followed by jsr $ff56 with the accumulator set to 0 or 1 (to select which controller to read). This will put the state of the joystick into the accumulator, and the x and y registers. See also:
Joystick.
And unless you have disabled the default IRQ handler, you don't need to call $FF53. Also, the reason you have to call $FF56 to get the state is because I want to move away from magic memory locations. Even the VIC-20 had an API to query the size of the screen, but it lacked calls for more advanced functionality. For the X16, I want to expose as much as possible/necessary through calls, so I have more freedom changing the memory layout in the future.
PS/2 / USB discussion (split from What's the state of play with serial port support?)
Posted: Sun Aug 30, 2020 4:01 am
by rje
On 8/27/2020 at 7:45 AM, Michael Steil said:
And unless you have disabled the default IRQ handler, you don't need to call $FF53. Also, the reason you have to call $FF56 to get the state is because I want to move away from magic memory locations. Even the VIC-20 had an API to query the size of the screen, but it lacked calls for more advanced functionality. For the X16, I want to expose as much as possible/necessary through calls, so I have more freedom changing the memory layout in the future.
When I read about polling the controllers, I thought that it was sinful moving away from memory-mapped I/O. But then I remember (once again) a video by 8-bit Show and Tell where the "1nvader" programmer had to do what almost amounts to "de-bouncing" the joystick fire button to avoid false triggerings.
And, I was glancing over Woz' tiny monitor, and I see that in order to print stuff to the Apple's screen, he has to explicitly check the state of the display driver. Whereas we simply have to jsr $ffd2.
So, bring on the routines. This is fine.
PS/2 / USB discussion (split from What's the state of play with serial port support?)
Posted: Sun Aug 30, 2020 7:00 am
by BruceMcF
On 8/27/2020 at 8:45 PM, Michael Steil said:
And unless you have disabled the default IRQ handler, you don't need to call $FF53. Also, the reason you have to call $FF56 to get the state is because I want to move away from magic memory locations. Even the VIC-20 had an API to query the size of the screen, but it lacked calls for more advanced functionality. For the X16, I want to expose as much as possible/necessary through calls, so I have more freedom changing the memory layout in the future.
Though shift / control was always by magic memory locations, even when you called the KERNAL, since SCNKEY put the keyboard scan value in a magic memory location, return shift/control/commodore status in a register and put the key in the keyboard buffer, which was another magic memory location.
It would be lovely if SCNKEY returned full shift/roll-over information with a shift mask and the number of keys in the keyboard event in A, 0 if no key is pressed, b7=Shift b6=Ctrl b5=Cmndr, b0-b2 number of roll-over keys, with the address of the rollover keys (normally 0 or 1) in XY.
PS/2 / USB discussion (split from What's the state of play with serial port support?)
Posted: Sun Aug 30, 2020 7:01 am
by BruceMcF
.
PS/2 / USB discussion (split from What's the state of play with serial port support?)
Posted: Sun Aug 30, 2020 7:01 am
by BruceMcF
.
PS/2 / USB discussion (split from What's the state of play with serial port support?)
Posted: Mon Sep 07, 2020 11:04 am
by martinot
On 8/27/2020 at 1:43 AM, BruceMcF said:
An opportunity to what, exactly? To have games limited to four directions and one fire button, and lose 5-6 out of 14 GPIO from the User Port?
That's mostly the opportunity to lose game developers for the CX16, because once you've gotten used to developing for a controller with an adequate number of inputs, going back to the Atari joystick with single fire button is very constraining.
Yes, I can understand that. It is just that anything Commodore (or Atari) is so (for me) tightly linked to that type of connector and style of joystick!
But I can see why you would like to have something better. In fact I did that even back in the days; As the Apple II+ (and not the Commodore/Spectrum/Atari) computers where my own machine growing up, I actually prefer/preferred the analogue joystick input those provided (way better than digital only directions).
?