Electronics > Projects, Designs, and Technical Stuff

Cloning a Tandy TRS-80 Model 1

<< < (16/26) > >>

GK:

--- Quote from: kizmit99 on January 25, 2019, 10:34:01 pm ---I would think you'd pretty-much *have* to be able to use both the keyboard and the joystick at the same time though.

--- End quote ---

That will be easy enough to implement.


--- Quote ---To be honest though - while an interesting exercise I probably wouldn't use one.  Part of the 'thrill' of the retro machines is their sometimes awkward primitiveness...

--- End quote ---

Well, I for one dislike playing any kind of game on the keyboard, except perhaps for a text adventure. Another issue I have run up against, with some of my PET games is that the keys used aren't always in convenient or even even usable locations on the PS/2 format.

I'm going to build this interface, but with two Atari-standard joystick ports (with Genesis/MegaDrive controller compatibility) to support two player games.

GK:
Well I figured out why BASIC Level II wasn't booting. I probed the address decoder to see what was up and noticed that the CPU was stuck in a loop, doing nothing aside from continuously polling the keyboard at ~1 second intervals with address line A6 asserted only. Keys tied to A6 are "Enter", "Clear", "Break", the four cursor keys and "Space". As it therefore appeared as though the CPU was waiting for input in the from of one of these keys being pressed, I started to hit them in sequence...... bingo - holding down (as it is only polled every ~second) the break key boots the system and "MEMORY SIZE" pops up on the screen. Each subsequent press of the break key causes "MEMORY SIZE" to be printed again on a new line.

This isn't mentioned in the manual I have. Anyone know what is going on here? It's as though (guessing that) the computer is initially trying to boot from an external device, until you "break" out of it. There might be some aspect of my incomplete hardware that is causing it to initially boot this way?

As an aside, I can now load and run 500 baud software and have access to the full 48k of RAM (yippee):
 

GK:
OK, I  googled and found a hint:

"With an Expansion Interface connected, but without boot disk, the Model 1 will not start and show a screen of garbage chararacters. If BREAK is pressed during power up or reset the MEMORY SIZE? message is displayed. The reset button is at the left back side, next to the expansion connector. "

https://fjkraan.home.xs4all.nl/comp/trs80/basicDescription.html


So for some reason my breadboard machine when running Level II BASIC seems to think it has an expansion interface plugged in and is initially looking for a "boot disk"..........

biff:

--- Quote from: GK on January 26, 2019, 09:00:20 am ---OK, I  googled and found a hint:

"With an Expansion Interface connected, but without boot disk, the Model 1 will not start and show a screen of garbage chararacters. If BREAK is pressed during power up or reset the MEMORY SIZE? message is displayed. The reset button is at the left back side, next to the expansion connector. "

https://fjkraan.home.xs4all.nl/comp/trs80/basicDescription.html


So for some reason my breadboard machine when running Level II BASIC seems to think it has an expansion interface plugged in and is initially looking for a "boot disk"..........

--- End quote ---

The ROM attempts to determine the presence of the Expansion Interface by querying the FDC status register at memory location 37EC.  What does your implementation return when that location is queried?
Without an EI connected, that memory location doesn't decode - so the Z80 normally just sees 0 and ROM uses that as a flag to indicate there is no EI and skips the routine where it would attempt to read the boot sector of drive 0.
I'm betting your implementation is returning something else there.

Holding down the Break key at startup bypasses the 37EC check, so you always end up in Level II with or w/out an EI.

Just to be clear, w/out an EI - there is no need to hold down the Break key to enter Level II.

For a really good illustration of this boot procedure, download the George Phillips emulator here:
http://48k.ca/trs80gp.html

It runs under Windows - but works great under Linux or MacOS via Wine.

Start it via:

trs80gp.exe -m1 -dx -b 068B

And that will set a break point right in area of ROM where it performs the check - and shows a nice disassembly of what it is doing.

(The -dx tells the emulator to not emulate an expansion interface - so the FDC detection check will fail)

GK:

--- Quote from: biff on January 26, 2019, 01:47:57 pm ---
--- Quote from: GK on January 26, 2019, 09:00:20 am ---OK, I  googled and found a hint:

"With an Expansion Interface connected, but without boot disk, the Model 1 will not start and show a screen of garbage chararacters. If BREAK is pressed during power up or reset the MEMORY SIZE? message is displayed. The reset button is at the left back side, next to the expansion connector. "

https://fjkraan.home.xs4all.nl/comp/trs80/basicDescription.html


So for some reason my breadboard machine when running Level II BASIC seems to think it has an expansion interface plugged in and is initially looking for a "boot disk"..........

--- End quote ---

The ROM attempts to determine the presence of the Expansion Interface by querying the FDC status register at memory location 37EC.  What does your implementation return when that location is queried?
Without an EI connected, that memory location doesn't decode - so the Z80 normally just sees 0 and ROM uses that as a flag to indicate there is no EI and skips the routine where it would attempt to read the boot sector of drive 0.
I'm betting your implementation is returning something else there.
--- End quote ---


My address decoder doesn't select anything in that location, which is located almost at the very top of an "unused" two kilobyte block located directly above the level II ROM space.
If that address is read the Z80 will just be reading random bytes (not necessarily - in fact highly unlikely - zero) as all of the data bus lines will be floating.

Just a random brain fart / stab in the dark here - I wonder if the memory devices used in the original TRS-80, paralleled up on the data bus, still weakly pulled down their data I/O pins when de-selected?
 

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