Re: JoyLoader

From: Mia Magnusson <mia_at_plea.se>
Date: Fri, 18 Jan 2019 09:05:47 +0100
Message-ID: <20190118090547.00000eef@plea.se>
Den Fri, 18 Jan 2019 00:32:50 +0000 skrev smf <smf@null.net>:
> On 17/01/2019 23:01, Jim Brain wrote:
> > I think he was thinking people would type in the program.
> 
> I guess he may have, but he didn't say it.

He kind of stated it between the words :)

> You don't get all 8 keyboard rows and columns on the joystick ports,
> so you can't hookup both joystick ports and type all keys. You may be
> able to avoid the keys you can't type and automate typing in the
> loader.

Bonus question: Is it at all possible to use the joystick ports on a
C64, or C128, to actually enter and run any kind of executable program
without using the keyboard?

If not, what is the minimum number of keystrokes needed to enter a
program mostly by using the joystick ports?

As the KERNAL code is well known, it might (or might not) be possible
to have the external hardware time when the KERNAL reads the
ports, sync up with when bad lines are generated (afaik at least on PAL
C64's the keyboard CIA interrupt is still generated at 60Hz even though
the screen runs at 50Hz), and be able to know when the kernal reads
parts of the keyboard not connected to the joystick ports, and that way
actually "press" som of the keys not connected to the joystick ports.

If it would be possible to do this, it should be possible to enter the
keys which fall in a 5*8 part of the 8*8 keyboard matrix.

I had a look at the schematics/matrix, and it seems like unfortunately
too many chars are the part that can't be generated using the joystick
ports, even if my theoretical trick above is used.

The keys that can be used, if my trick works, is:
0123456789
ABCDGIJLMPRWYZ
-+.;* £
F1 F7 CTRL "CLR/HOME" DEL "left arrow" SHIFT "cursor
left/right" RETURN

Thus it's not possible to "type" poke or pO, not possible to assing a
value to a variable (which would store well-known data at a well-known
address) due to lack of the = char.

It's not possible to execute using SYS, RUN or USR.

RUN/STOP is also missing, so it's not possible to "type" RUN/STOP and
then STOP to force a RUN.

E is missing, thus it's not possible to enter something like a program
with data lines and in immediate mode reading the data into variables.

But it's darn close to what's required to enter a program. As we can
"type" all numbers and dA, we can make a bunch of data lines. That
would get rid of the worst part of entering a program every time you
boot the computer.

Btw, if my trick fails, or if simpler hardware would be used, the
useable keys drop down to:

DEL RETURN "cursor left/right" F7 F1
34567890
ABCDGIJMRWYZ
that makes even harder, as there aren't any shift key.

On a C128 it would however be possible to enter the monitor, enter
data to ram using the M command, and execute it using the G command! If
omitting the hex digits 0,1,E and F it's possible to enter and run
machine code!

I can think of at least one real use-case for this:
Some kind of intelligent joystick switch could use this to run some
software to select configuration of the switch. It could be triggered
by pressing the button on either connected joystick at start
(recognizable by the combination of power on, button held, and after
the computer is done with the startup code, keyboard scan can be
detected on the joystick ports).




-- 
(\_/) Copy the bunny to your mails to help
(O.o) him achieve world domination.
(> <) Come join the dark side.
/_|_\ We have cookies.
Received on 2019-01-18 10:00:03

Archive generated by hypermail 2.2.0.