Emulation target: Tandy M100

I was bored and thought what I could do next. The Tandy M100 portable computer would be a nice target to try. It had a 8085 CPU, which is a subset (except some additional opcodes) of the Z80 and I made yaz80 optionally compile to emulate the 8085 and its few extra opcodes. Interrupts are not yet complete (8085 is much more complicated than the Z80 in this regard) and SID/SOD pins, serial I/O on the CPU, are to be emulated.
The M100 featured a pixel level LC display with fantastic (for that time) 250x64 pixels. 240x64 thereof were used to display 40x8 text using a 6x8 font. The ROM was 32K, half the addressable memory, but it contained besides BASIC a text editor, a terminal program and a scheduler.
The addressing of the LC display is absolutely weird. Attached is an excerpt of my findings and documentation from a C source that already emulates the M100 on a PC. The addressing of a pixel was certainly a nightmare for anyone wanting to output something in assembly language. The display was divided into 10 "panels" of 50x32 pixels each. The first byte's bit 0 would be the topmost pixel, bit 7 would be below. The 32 pixel lines were offsets by 64 bytes, but only the first 50 bytes were actually displayed. I'm not sure if the display had memory cells for the bytes 50..63 of each sub-panel. The 10 panels were ordered left to right, top to bottom. Now find the address for the pixel at 131,42 .. huh?
Because of the weird addressing I need two cogs to emulate the LC display. One will be converting the odd format of the display storage into a scanline buffer of 320x64 pixels. The video output will then use different VSCL values to compensate for the invisible pixels: 5 times 32 + 18 pixels from the longs in the bitmap buffer. This part of the emulation is already working, again using the 1pinTV idea, because I don't need more than this.
Since there's a lot of empty scan lines and left + right border, I may add some graphical elements around the simulated LCD, such as a border and perhaps a Tandy logo
Also the keyboard object should already work, because it's also a simple matrix of 9 rows x 8 columns, just with different assignments to the keys. And it isn't memory mapped, but I/O mapped.
The hardest part to emulate will be the UART, the PIO (81C55) timers and interrupts and the RTC1990 chip, a real time clock of anno tubac
What makes the M100 interesting is the builtin terminal software and the capability to download documents and BASIC programs from there. It also supported cassette saving and restoring of documents and programs. I'm not sure if I should try to emulate that, because it would require some interception to select a filename from or to the SD card. If OTOH I manage it to emulate the UART well enough, you should be able to connect to a PC and up- and download documents and programs.
Edit:
Version 0.2.0 adds a new 8085 core (q85) that is based off of qz80.
Version 0.2.1 uses optimized q85.spin code
Version 0.2.2 got rid of the separate XMM code in favor of the combined SD SPI + XMM cog
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pullmoll's Propeller Projects
Post Edited (pullmoll) : 4/27/2010 4:13:52 PM GMT
The M100 featured a pixel level LC display with fantastic (for that time) 250x64 pixels. 240x64 thereof were used to display 40x8 text using a 6x8 font. The ROM was 32K, half the addressable memory, but it contained besides BASIC a text editor, a terminal program and a scheduler.
The addressing of the LC display is absolutely weird. Attached is an excerpt of my findings and documentation from a C source that already emulates the M100 on a PC. The addressing of a pixel was certainly a nightmare for anyone wanting to output something in assembly language. The display was divided into 10 "panels" of 50x32 pixels each. The first byte's bit 0 would be the topmost pixel, bit 7 would be below. The 32 pixel lines were offsets by 64 bytes, but only the first 50 bytes were actually displayed. I'm not sure if the display had memory cells for the bytes 50..63 of each sub-panel. The 10 panels were ordered left to right, top to bottom. Now find the address for the pixel at 131,42 .. huh?
Because of the weird addressing I need two cogs to emulate the LC display. One will be converting the odd format of the display storage into a scanline buffer of 320x64 pixels. The video output will then use different VSCL values to compensate for the invisible pixels: 5 times 32 + 18 pixels from the longs in the bitmap buffer. This part of the emulation is already working, again using the 1pinTV idea, because I don't need more than this.
Since there's a lot of empty scan lines and left + right border, I may add some graphical elements around the simulated LCD, such as a border and perhaps a Tandy logo

Also the keyboard object should already work, because it's also a simple matrix of 9 rows x 8 columns, just with different assignments to the keys. And it isn't memory mapped, but I/O mapped.
The hardest part to emulate will be the UART, the PIO (81C55) timers and interrupts and the RTC1990 chip, a real time clock of anno tubac

What makes the M100 interesting is the builtin terminal software and the capability to download documents and BASIC programs from there. It also supported cassette saving and restoring of documents and programs. I'm not sure if I should try to emulate that, because it would require some interception to select a filename from or to the SD card. If OTOH I manage it to emulate the UART well enough, you should be able to connect to a PC and up- and download documents and programs.
Edit:
Version 0.2.0 adds a new 8085 core (q85) that is based off of qz80.
Version 0.2.1 uses optimized q85.spin code
Version 0.2.2 got rid of the separate XMM code in favor of the combined SD SPI + XMM cog
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Pullmoll's Propeller Projects
Post Edited (pullmoll) : 4/27/2010 4:13:52 PM GMT
Comments
I had an M100 "clone" - very similar, except that it was black.
Cool.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.mikronauts.com E-mail: mikronauts _at_ gmail _dot_ com 5.0" VGA LCD in stock!
Morpheus dual Prop SBC w/ 512KB kit $119.95, Mem+2MB memory/IO kit $89.95, both kits $189.95 SerPlug $9.95
Propteus and Proteus for Propeller prototyping 6.250MHz custom Crystals run Propellers at 100MHz
Las - Large model assembler Largos - upcoming nano operating system
If I remember correctly these were CMOS and so the batteries lasted forever and it didn't interfere with radio comms so hams loved them
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Style and grace : Nil point
Post Edited (Toby Seckshund) : 4/1/2010 12:18:54 PM GMT
Yes, the memory was non-volatile and you could start right where you left off. I couldn't achieve such a nice thing back in the..hmm... late 1980s. I remember one of our CEOs had one. It were always the ****** with the least programming skills that had the best hardware. Coders like me were sent to work in the server room, sweating like mad at 40°C and struggling for a breath of fresh air
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
Bill
Hmmm.... It's criminal, I know, but gutting one of those things for a Prop retrofit would be kind of bad ***, wouldn't it?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
If you can get a completely broken one from ebay or your local flea market, why not? Killing a living one just to fit a prop in it would be close to a human sacrifice.
I would like to build some mini prop board with a b&w LCD for the TRS80, just to impress some of my friends [noparse];)[/noparse]
On topic: I just realized the I/O handling this time won't fit into a cog. This thing has just too many ports. Looks like I'm finally going to learn Spin.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
Post Edited (pullmoll) : 4/2/2010 5:32:09 AM GMT
That exact machine, the M100 has been the target of some of my work with he prop. I just do not what a loose board and a hanging display. I want a closed unit I can use for something useful... I already interfaced a 240x64 LCD (with a T6963 controller) to the prop it works well. But that machine is much more and really slow but doable.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
Present day support and a huge library at www.club100.org/
32kBytes of RAM for system hooks and user programs interpreted in place
32kBytes of ROM for the system firmware and BASIC interpreter.
hmmm, all it needs is more cogs. Sounds like a neat project.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com
Interesting! Yes, the display may be not too bad for Propeller purposes, except for the weird addressing. Well, once you sorted it you can actually live with it.
Loose board + hanging display? What did you do with the M100 case? Uh! You do not _want_ a loose board. Now I got it.
The prop emulation of the M100 probably won't be a runner also, while it may serve as a last resort replacement.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
However, I have a BUNCH of educational machines that came out of the school system at my shop.
About the same size, about the same size display.
I have around 100+ of these and the guy who dropped them off (consignment) doesn't want much for them.
I'll try to get some specs together tonight/tomorrow. It would be LOVELY to have one of these
with a Propeller in it, emulating the M100 (or M100+propeller features)
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered? PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
A HUNDRED? Woah. And I didn't fully get you: are these M100 or just similar to M100s?
Yes, that'd be cool. You could even drive the M100 display with the prop
BTW I put the first release on the front page. All it does is _not_ crashing, but that's about it. The display is very wrong and the keyboard doesn't seem to have any effect yet.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
I wanted to collect rotated bits in a number of longs to store them to scanlines.
If I read a long from the LCD, I have 4 columns by 8 lines (see display.txt in first post). I shr data once, and rotate with carry into the next long once, 32 times. To get to 32 columns, i.e. a long to store for horizontally oriented pixels, I have to do that 8 times, giving me 32x8 = 256 pixels in 8 longs. Then I can store these 8 longs as 8 scan line sections under another. This story repeats twice per "driver", i.e. 64 pixels horz., and 5 times for the 5 drivers in a scan row. All this repeats 4 times for 5 completed "drivers" of 64x32 pixels and all that stuff before repeats twice for the two "driver" rows on the LCD.
I tried to code it and lost the oversight. Not once, but several times... Anyone care to help me out?
I fear I have to resort to copying pixels with getpixel and putpixel subroutines or I get mad.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
Post Edited (pullmoll) : 4/3/2010 8:14:47 AM GMT
I'm out of time now but when I thought about it I decided to interpret the writes to the ctrl and keep a bitmap in memory.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
I took up your idea. It seems much simpler to render the resulting bitmap at the time when a byte in the source bitmap is changed.
The display is still scrambled right now, but at least there is no garbage, just some columns/rows swapped wrong.
Yes, I got it right now. It displays the Microsoft copyright, a list of applications and the free memory. Keyboard isn't doing anything yet. Version 0.0.2 at the front page.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
Post Edited (pullmoll) : 4/3/2010 2:59:16 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
Post Edited (pullmoll) : 4/5/2010 12:45:42 PM GMT
As I can see it can be problem to emulate orginal ROM in HUB memory that M100 Uses entire 64KB space In 8085AH.
Have You SCH's to it On entire MEMORY usage on M100
Regards
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nothing is impossible, there are only different degrees of difficulty.
For every stupid question there is at least one intelligent answer.
Don't guess - ask instead.
If you don't ask you won't know.
If your gonna construct something, make it·as simple as·possible yet as versatile as posible.
Sapieha
The 8085 address space is in extended memory, not in HUB memory. It requires a board with additional RAM such as the DracBlade (where I test it) or the RamBlade (where I can't test it) or the TriBlade.
BTW I found the bug. I often fail at specifying the WZ and/or WC flags on TEST instructions. It was the case in the SIM instruction which wouldn't enable the RST7.5 mask and so no interrupts could occur.
Now I have to do something about the much too slow LCD output. I used task code in the video cog, but that one is too busy. I think the LCD deserves a separate cog.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
Now I've got to hook up the M100 UART to the Prop's serial port and try to run some programs.
Oops! Fixed two wrong keyboard table entries. Q was A and Y was U...
I wish I knew what to enter at the "Telcom:" prompt. Looks like it is expecting me to type the communications parameters, because it prints "M7I1E,10 cps"... I've got to read a manual.
Ah, so you type "Stat 98N1D" for 19200 bps, 8 bits, no parity, 1 stop bit and disabled line status (hardware handshake?). With 0.1.1 you can now communicate from the PC terminal to the M100 and vice versa.
Saving to the terminal program with save "com:98n1d" works, but receiving a (bigger) program does not work. My terminal program probably overruns the M100 UART :-(
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
Post Edited (pullmoll) : 4/5/2010 4:00:35 PM GMT
I have a pair of NEC PC8201A's, which were very similar to the M100, which I've been planning to gut and propellerize. (They're not quite M100 compatible, so a lot of the updating hacks for the M100 don't work on them. So they're easier to find and it's not such a sin to destroy one.) They have that exact same display, and the thing is if you wanted a display that size and with that low a power dissipation (since it's not backlit) there just isn't anything available.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
Well, a few things are left to do:
Hook up the printer output to the second serial port.
Support a prop-board RTC to M100 RTC copy - I have no RTC on the board..
Make the video display a little nicer, probably displaying the keyboard from some compressed (RLE?) bitmap in memory.
Find out why downloading to the M100 doesn't work, not even as slow as 2400 bps.
Support loading of full 32K RAM images from the SD, so you could start M100 with a preset list of files in memory. Need a way to save a 32K image to SD for that, probably by abusing an output port.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
Post Edited (pullmoll) : 4/5/2010 7:54:27 PM GMT
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
@Everyone else: Don't rip apart those M100 or clones yet.
I apologize that I haven't had a chance to get more information, but here are the units that are in my shop.
www.streettech.com/archives_hardware/dreamWriter.html : Dreamwriter T400
As soon as I get a chance, I'll gut one with my camera handy and see if we can get a prop in there.
I'm betting this would be a perfect box/screen for less than $10.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered? PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
The display looks more like 80 columns by 2 rows. The original vendor's website is dead and replaced with some pseudo search engine.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
There is an ebay auction for these (Not my auction, but some good pictures.)
I'll try to get one powered up today and confirm it to be a 4+ line display. There appears to be a serial port on the rear,
which gives me some hope this might be usable with the prop. Personally, I'm looking for a way to play with my
propeller on the plane ride to CA, and whipping out my demoboard isn't going to cut it. [noparse]:)[/noparse] I need the distraction during the flight.
If you PM me your address, I'll get one of these shipped to you within a day or two.
It's probably the best way to really evaluate these for this use.
OBC
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Are you Propeller Powered? PropellerPowered.com
Visit the: PROPELLERPOWERED SIG forum kindly hosted by Savage Circuits.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Propeller Wiki: Share the coolness!
8x8 color 80 Column NTSC Text Object
Safety Tip: Life is as good as YOU think it is!
There are the SID and SOD pins of the 8085 CPU which are used to save and restore cassette images. I don't know if perhaps I should connect them to the prop's i/o pins (if specified in the configuration).
The speed of the emulation is too slow. It reaches 1.47 to 1.5 MHz, while the M100's 8085 ran at 2.4MHz.
Downloading at 19k2 bps now (sometimes) works and I'm going to try to create some RAM images with files stored in memory which then could be loaded from SD.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
He died at the console of hunger and thirst.
Next day he was buried. Face down, nine edge first.
Post Edited (pullmoll) : 4/6/2010 6:02:18 PM GMT