Electronics > Projects, Designs, and Technical Stuff

Cloning a Tandy TRS-80 Model 1

<< < (11/26) > >>

SiliconWizard:

--- Quote from: GK on January 12, 2019, 03:07:11 pm ---

--- End quote ---

Is that what we could call "spaghetti hardware"?  ;D

Impressive breadboarding job though. Not sure I would have the patience to do that anymore... :-+

oPossum:
Archive of TRS-80 Model 1 software here: http://www.classiccmp.org/cpmarchives/trs80/Software/Model%201/
There are several versions of Scripsit.

Software to make audio files: http://www.trs-80.com/wordpress/disk-and-tape-conversion-utilities/

One of my favorite Model I programs was 'Dancing Demon'. It is in the archive. Manual is here: https://archive.org/details/Dancing_Demon_1980_Tandy

kizmit99:
I was thinking about your approach to the keyboard.  I'm making assumptions about what's going on inside the PIC, but I suspect they're correct...
If correct, it doesn't look like you'll be able to express multiple keys down at the same time (exclusive of shift)?  Not sure if you care, but that was something used in at least the 'mini-dos' feature of NEWDOS/80...  If that's not correct, I'd be curious how you're handling that case with only the 6 lines coming out of the PIC to choose-a-character.

I only noticed this because I recently had to redo a bit of my keyboard interface to deal with more of the oddness surrounding the mapping of an event driven keyboard (the PS2) to the very-simple (yet basically instantaneous) nature of the TRS80 approach.

If you get a chance, try the following on your keyboard and see what the results are:
<Press Shift><Press :|;><Release Shift><Release :|;>  -- I suspect the TRS80 code will see ":", followed by ";". 

From what I can discern, the original keyboard scan routines deal with the fact the user may release shift out-of-order, but the fake-"shift"ing/Un"Shift"ing that we need to do when doing the mapping, generally (unless cared for), results in the shift signal changing state in a way that causes the TRS80 code to see both keys being typed.  I've found similar issues with the "+|=", "'|"" (single/double quote key), and issues with "@".  Basically any keys where the PS2 keys map to two separate TRS80 keys.

I was able to correct that behavior on my design by only allowing my "ForceShift" and "ForceNoShift" signals to change at the beginning of each PS2 keypress.  I realize that doesn't "mean anything" without having the internals of my design, but I suspect you're doing something very similar in your PIC code - so perhaps it will make sense  :-//

Interestingly enough (to me at least) the TRS32 emulator suffers from exactly the same symptoms I was seeing.  (So I at least take solace in the fact I'm not the only one who missed it  ;))

GK:

--- Quote from: oPossum on January 13, 2019, 06:58:43 am ---Archive of TRS-80 Model 1 software here: http://www.classiccmp.org/cpmarchives/trs80/Software/Model%201/
There are several versions of Scripsit.

Software to make audio files: http://www.trs-80.com/wordpress/disk-and-tape-conversion-utilities/

One of my favorite Model I programs was 'Dancing Demon'. It is in the archive. Manual is here: https://archive.org/details/Dancing_Demon_1980_Tandy

--- End quote ---


That's a nice resource, thanks. I looked up Dancing Demon on Youtube - that was probably some high-end computer animation back in the day!

GK:

--- Quote from: kizmit99 on January 14, 2019, 06:21:45 pm ---I was thinking about your approach to the keyboard.  I'm making assumptions about what's going on inside the PIC, but I suspect they're correct...
If correct, it doesn't look like you'll be able to express multiple keys down at the same time (exclusive of shift)?  Not sure if you care, but that was something used in at least the 'mini-dos' feature of NEWDOS/80..
--- End quote ---


Correct. As currently breadboarded, aside from the shift key which is handled separately, two or more keys cannot be applied simultaneously. It didn't occur to me that this might be a desired or necessary feature; thanks for raising it. Minus the shift keys there are only 51 keys to encode, hence the six (1-of-64) key character-select lines to the LUT ROM only. One additional location needs to be reserved for an unasserted keyboard, but that leaves me 12 remaining addressable locations any/each of which can be programmed to assert any single key again or any possible combination of multiple keys. However the multiple-key combinations would have to be specifically recognized by the PIC. If there is, for example, some odd-ball program which requires you to press A and L together, such, with the current implementation, could be accommodated this way. I still have two ROM address lines currently unused, so I could theoretically increase the number of programmable special key-combinations to 204, but this might become tedious.

Would NEWDOS/80 be unduly crippled without the ability to simultaneously assert keys?

Alternatively a matrix array of individual AND gates (one for each key), with the outputs ORed in banks for each data output line, individually addressed by the PIC, would completely obliviate any hardware limitations to multiple key presses. However this is now a non-LUT solution fit for a small CPLD rather than an EPROM, which isn't what I had immediately at hand on the weekend when I decided to get some keyboard input happening. I think this is the approach that I am going to take now. Time to get Quartus installed onto my new PC.



--- Quote from: kizmit99 on January 14, 2019, 06:21:45 pm ---If you get a chance, try the following on your keyboard and see what the results are:
<Press Shift><Press :|;><Release Shift><Release :|;>  -- I suspect the TRS80 code will see ":", followed by ";". 

From what I can discern, the original keyboard scan routines deal with the fact the user may release shift out-of-order, but the fake-"shift"ing/Un"Shift"ing that we need to do when doing the mapping, generally (unless cared for), results in the shift signal changing state in a way that causes the TRS80 code to see both keys being typed.  I've found similar issues with the "+|=", "'|"" (single/double quote key), and issues with "@".  Basically any keys where the PS2 keys map to two separate TRS80 keys.
--- End quote ---


Yes, I just tried and my clone does respond this way. To be honest, this isn't something which would bother me personally, but is is easily rectified in firmware by delaying the release of shift as you describe.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod