Re: JoyLoader

From: Nejat Dilek <imruon_at_gmail.com>
Date: Wed, 23 Mar 2022 18:51:57 +0300
Message-ID: <CAP5r8NQaFbizOAryAc6df7GChXzAQkogpHwBQ0W6bQooGMERCw_at_mail.gmail.com>
When my keyloader pcb arrived I visited this endevour again. Pcb contains
just a MCP23S17 port expander wired to keyboard port and connected to
atmega328 through SPI.
Then the whole project and the learning part started again. Quickly
realized that I needed a matrix switch to efficiently type the keys like in
the Jim Brain's or similar projects.

Then tried do get most out of what I have and have to do what has been
suggested here... Estimating when the individual lines in Port A getting
pulled low rather than sensing...
That worked for loading from Keyboard. Still writing the first and
secondary stage loaders were a bit debugging heavy but in the end
successful.

https://www.youtube.com/watch?v=TQn3dnkZfCM

Then comes loading from the Joystick ports... It would be better maybe to
try out the ideas here first since I had much more knowledge compared to
what I have 3 years ago.

Above timing hack extended my choice of keys for the full extent of Port A
range (PA7, PA6, PA5 too) where a crucial one right shift key and home key
is located at PA6.

For the missing keys I made use of being able to navigate with the cursor
anywhere I want. Got stuff out of error messages, extension of basic
tokens, READY prompt, the question mark and so on.
Instead of poking stuff which was a bit typing heavy since I don't have O,
K, E and comma I made use of the fact that basic storing integer variables
as two bytes each flat in memory.

So my basic program become something like this albeit with a much larger
loader (I do regret that I didn't my original loader from 3 years ago)

This basic program encodes just a test routine,
The hardest part is the typing of = key since this key isn't anywhere in
error messages and so on I had to first type PRINT CHR$(61)... typing PRINT
is easy because of the ? SYNTAX ERROR prompt, for the H character I used
shorthand for RIGHT$.
Each keyword presented a challenge on it's own, when typing RUN for example
I made use of the error ILLEGAL QUANTITY ERROR by typing A%(32768) and
return.

1dima%(10)
2reada%(i%)
3i%=i%+1
4if10>i%goto2
5data-5398
6data-5398
7data6382
8data8400
9data-28422
10data0
11data0
12data0
13data0
14data0

The final result is here : https://www.youtube.com/shorts/Cmk5AUaeS1Y

I deliberately switched to text color with background color to make it up
to the imagination of the watcher as to what has been going on under the
hood.

Initial loader is not optimized in any way. The loader in the initial post
may speed this up at least 2-3 times. And of course alternative entry
methods may be devised to make this faster. The limiting factor is the
kernal's 60 times in a second timer interrupt to process the keys. In the
final part I removed the port expander too since it also works setting up
the atmega328's gpios as input and only pulling low when necessary.

Best regards,

Nejat
Received on 2022-03-23 17:00:07

Archive generated by hypermail 2.3.0.