Close
0%
0%

V-Tech Genius Leader / PreComputer Hacking

Turning a toy into a hardware tinkering platform

Similar projects worth following
Those childhood learning computers can be turned into pretty nice Z80 hacking stations!

This project describes a journey into vintage Z80 based learning computers manufactured by "V-Tech" in the 80s and 90s. Starting with some reverse engineering information, PCBs for interfacing the cartridge port and software development notes.

Currently, there is proof-of-concept support for enabling MIDI in/out, or using it as a terminal for a Raspberry Pi, interfacing a PC using FTDI and the printer port, and even some DOS or CP/M like functionality using a SD card and an Arduino.

The goal of this project is to create a set of hardware and software tools to "hack" the 1000/2000/4000 (and maybe also 6000) series of V-Tech 8-bit learning computers.

Current status:

  • The hardware is well understood: Z80 CPU, HD44780 LCD controller, keyboard matrix, printer port, bank switching, sound, LED, ROM, RAM and cartridge port.
  • The firmware has been reverse engineered to a degree that allows writing custom system ROMs, as well as compiling ROM images that are recognized as cartridges and run by unmodified systems.
  • Software can be compiled using SDCC and emulated using MAME.
  • The printer port can be retrofitted to systems that don't natively have one.
  • Cartridge PCBs have been designed to allow using (E)EPROMs and memory mapped I/O.
  • By using "bit banging", the printer port can be used as a 9600 baud serial port without any hardware modifications.
  • Using a small hardware modification (soldering wires to ChipSelect pins) it is possible to re-locate external ROM and RAM to the low memory space, allowing arbitrary address space layouts.
  • At the moment I am writing a custom CP/M BIOS/BDOS that can load and run files via the serial port.

VGL_CPM_0.0.7_WIP_20191202.zip

Minimal CP/M operating system implementation that can actually run ZORK. Work in progress!

Zip Archive - 60.83 kB - 12/03/2019 at 00:18

Download

VTech_SDCC_20190803_headers-includes.zip

All files needed to develop your own cartridge ROMS using the SDCC compiler. Using stock firmware hooks.

Zip Archive - 269.29 kB - 08/03/2019 at 15:44

Download

VTechCartridge_RevD_20190731_KiCAD-Gerber.zip

KiCAD design files for the "BusF###er" cartridge. Rev D. Work in progress!

Zip Archive - 305.44 kB - 08/03/2019 at 15:42

Download

  • "You are standing in an open field..."

    Bernhard "HotKey" Slawik5 days ago 3 comments

    I had the feeling that I was going around in circles: Adjusting some assembly code, compiling, burning an EEPROM, inserting it, bootstrapping the RAM cartridge for CP/M, switching from ROM to RAM, booting CP/M, loading a .COM-file over serial, running it, ... and crashing.

    This became very tiresome quickly, as you can imagine.

    "Emulation to the rescue!", I thought. So I took a deep dive into the MAME source code and patched the PC2000 emulator: I changed the memory banks to be write enabled to simulate the RAM-switching hardware mod needed for running CP/M. I also added a debug port that allows sending and receiving data to/from MAME via stdin/stdout.

    That worked like a breeze. Now it's only one click to compile and pack the CP/M ROM, fire up MAME, load CP/M and open a data channel between the emulated CP/M machine and a python "host" script. This really speeds up the process of loading and altering code for debugging. I also added a TRAP function to BDOS, which allows stopping the program flow at a desired address, dumping registers+stack, and continuing with the execution.

    Having these tools at hand, I quickly identified a bank-switching bug and an error when reading records from files.

    I crossed my fingers, uploaded "ZORK1" to the emulated CP/M and gave it a try...

    ...it opened the "ZORK1.DAT" file...

    ...read some records...

    ...then some more...

    ...and even more...

    ...and more...

    ...until finally:

    ZORK - on a VTech Genius Leader 4000 running CP/M inside MAME
    ZORK - On a VTech Genius Leader 4000 running CP/M inside MAME

    Yeeeeha! I've never felt better, standing in an open field on a cold night like this :-D

    Don't get too excited, yet, because I immediately ran into the next 2-3 bugs with the keyboard handler. So it is not really playable at the moment. But this has been a really big milestone.

    Update: It's usable!

    A little fix in memory layout here, a change in keyboard layout there and...

    ZORK on a toy computer, anyone?
    ZORK on a toy computer, anyone?

    Christmas may come! :-)

  • >RUN

    Bernhard "HotKey" Slawik11/15/2019 at 12:07 3 comments

    Yesterday night I pulled out my oscilloscope and tweaked the timings used by the software serial implementation. I noticed some bits getting lost and tracked it down to the "edge delay" used to sync up with the start bit.

    Now data transmission is much more reliable than before. Nonetheless, it is recommended to employ a protocol with checksums and re-transmit to ensure binary proof data transmission.

    So, what should we do with it?

    Maybe... allow the CP/M BDOS to load files via serial from a computer?

    >python bdos_companion.py /dev/ttyUSB0 ZORK1.COM
    Ready.

    ...and then on the Genius Leader 4000: 

    32K VGL CP/M 0.0.4
    2019-11-14 by HotKey
    
    >SERIALLOAD
    LOADING...
    OK
    
    >RUN
    
    ZORK1 on VGL CP/M
    ZORK starts up! I think we need to implement proper virtual disk access next!

    Oooooooohhhhh!

    I think we're on-track to playing ZORK during the holidays! :-)

  • CP/M on V-Tech Genius Leader 4000: It... works!!!

    Bernhard "HotKey" Slawik11/05/2019 at 15:26 0 comments

    This is worth another project log...

    Since I got "boot from RAM" working yesterday, I eagerly started implementing the basic BIOS/BDOS functions of CP/M 2.2. No disk access, yet, but just the standard console input/output and housekeeping functions.

    Fortunately, CP/M is well documented and there aren't actually that many functions that need to be implemented for a basic system.

    So, I fixed my broken LCD DDRAM mapping and optimized the keyboard handler a little and added the most important CP/M BDOS functions.

    Then I took a small .COM file (SYSGEN), placed it into RAM and jumped to it...

    First CP/M program running on a Genius Leader 4000
    Houston, we have a code execution!

    I was greeted by the program banner! It works!

    That was really unexpectedly simple! The next 1-2 weeks will be used to implement a simple file system and all the necessary open/close/read/write functions, so we all can play ZORK before the year is over! :-)

    Stay tuned!

  • CP/M on VGL: Issues and Solutions (Updated!)

    Bernhard "HotKey" Slawik11/04/2019 at 10:46 1 comment

    Most of the inner workings of the V-Tech Genius Leader / PreComputer have been discovered. Even some lesser known functionality, which is hidden inside a proprietary silicon, is understood. Especially, how the LCD, the keyboard matrix, printer port and most of bank switching works.

    Now for the philosophical question: What should we do with it?

    When talking to people, most of them agree that getting an own operating system to work is priority 1. But on which OS to focus on is not fully clear. Personally, I would prefer CP/M, since it is the Z80 operating system with the most impact and support.

    There are two problems with CP/M on this "toy hardware":

    1. CP/M requires a disk drive. The V-Tech computers don't have one. But since we do have a cartridge port and proof-of-concept memory-mapped I/O, as well as a working serial port, getting some sort of SD card reader or serial storage medium to work should not be a big problem. In the meantime we can use bank-switched ROM/PROMS/SRAM or load software from the serial port (already working!)
    2. CP/M requires RAM to start at memory address 0x0000, since this is how CP/M programs interface with the BIOS/BDOS drivers. See: http://www.primrosebank.net/computers/cpm/cpm_structure.htm

    The latter problem is a bit more tricky. See, on power-up the Z80 CPU jumps to address 0x0000 and starts executing the instructions located there. That's why there is a big system ROM located at that address.

    Bank switching the system ROM

    After thinking long and hard, I decided to leave the "non-invasive" route and add a little hardware modification to my beloved Genius Leader 4000 Quadro. I opened it up and put wires to the "Chip Select" lines of the ROM, the RAM and the cartridge port. Fortunately, these 3 lines are conveniently located on one corner of the PCB (near the cartridge port) and each go through a wire bridge. It is really simple to cut these bridges and add some wires, so they can be connected/disconnected at will:

    V-Tech hardware mod
    "Chip Select break out" connector (upper right) allows disconnecting the internal ROM at will. A simple "Bus Doubler" (bottom) allows inserting two cartridges at once. You'll see why.

    On its own, this is not a very helpful mod :)

    But now you can insert a ROM cartridge and use a different "Chip Select" pin (the new "internal ROM ~CS" instead of the default "cartridge ~CS" on Pin 35). A slight modification in your code (segment now needs to be 0x0000 instead of 0x8000) and your external ROM cartridge can now act as the internal system ROM! That means: Now we have a full 32kB of additional address space without de-soldering the internal ROM!

    But be aware that the internal system ROM also contains crucial hardware initialization functions which now need to be done in our own ROM. This includes the LCD initialization sequence, resetting all the MUXes and bank switchers and -most importantly- reacting to interrupts and polling the keyboard matrix.

    My current implementation works fine in the MAME gl4000 emulator, but still has some issues with the LCD (one line is not showing - using a non-standard DDRAM mapping) and the keyboard is not working reliably. This still needs some more research to get right. But enough to continue with some more experiments...

    Booting from RAM

    But now for the really tricky part: As I said, CP/M needs RAM to be at 0x0000. But since RAM is -usually- volatile, we can not simply solder in a SRAM IC and call it a day. It won't boot, since it is empty.

    My current idea is to use the battery backed SRAM cartridge VTech Super Speicher 32KB for that. It contains a 32 kilobyte SRAM IC, as well as a coin cell battery and a few transistors (to invert signals and switch from internal to external power).

    It should be possible to boot from a custom system ROM (mapped to 0x0000) while having the SRAM connected to the cartridge slot (mapped to 0x8000). Then, prepare/bootstrap the RAM contents to contain the initial jump instructions....

    Read more »

  • A Strong Community!

    Bernhard "HotKey" Slawik11/04/2019 at 09:58 1 comment

    Wow! Since hackaday published an article about this project ( https://hackaday.com/2019/10/14/repurposing-a-toy-computer-from-the-1990s/ ), messages come pouring in from all over the world! And it fills me with joy, how many people like this project and have even already done amazing research in the same direction.

    Worth mentioning is the work done by @Alex Rider about the french "YENO Compusavant". which seems similar to the "Genius Leader 6000 SL".  Check out his website for more info: http://alexandre.botzung.fr/

    I think I will be setting up a Github repository to merge all findings in an "(Unofficial) V-Tech 8-Bit DevKit".

    So: Stay tuned and stay curious!

    Bernhard

  • Retrofitting a printer port

    Bernhard "HotKey" Slawik10/28/2019 at 19:14 4 comments

    Since many owners of models that don't have a printer port pointed out: There are some unpopulated parts on their main PCB and asked if the printer port could be retro-fitted.

    Well, I guess so!

    So there are only 8+1 bits in the OUT direction and a single bit in the IN direction. The latter is used to tell if a printer is connected and ready.

    As I have found out, it is also used for PC communication: Using the 8 data output bits, the notebook selects, which bit of the incoming byte it wants to be set on Pin 11. So I guess the PC-Link cable contains an 8-bit "AND" IC.

    But enough chatter: Here is the list of missing parts for the printer port:

    Component IDMarkingsDescription
    <IC>P9506AN / DM74LS244N
    74LS244N Octal Buffer
    <Connector>Ribbon cable to D-SUB 25Ribbon 1-9 to Pin 1-9
    Ribbon 10 to Pin 11
    Ribbon 11 to Pins 18...25 and Shield
    (where Ribbon 1 is near C93)
    C1240340 nF capacitor
    C93222 AEC2.2 nF capacitor
    R35, R41, R42, R43, R44brown black orange10k resistors
    Q10LM90 /  14C / M[otorola] 521NPN transistor
    Q11LM90 / 15 C / M[otorola] 512PNP transistor

    Please let me know if you find any mistakes. Also, drop me a line if you managed to pull off the upgrade procedure. I'd love to hear about it!

    Happy upgrading!

  • BusF###er Cartridge, Friends and DOS

    Bernhard "HotKey" Slawik08/03/2019 at 15:40 0 comments

    I haven't written much about the PCB I have created to interface the V-Tech cartridge bus. That's mainly because I just haven't had enough experience designing PCBs so far, and didn't want to unleash a poorly designed and untested layout to the masses. So I spent 2018 doing a lot of design iterations on the so called V-Tech BusF###er cartridge, making it more configurable, reliable and debuggable.

    It is 2019 now and I finally dared to send the first PCB layout to the manufacturing plant... And I was pleasantly surprised about the quality of the boards -- and disappointed about my skills ;-)  as I simply made a lot of stupid mistakes (connected wrong GNDs, didn't leave space for additional caps or pull-downs, made important traces impossible to reach etc.)

    But as of July 2019, there are now several Rev C boards on my desk, each successfully serving a custom boot ROM and having latches and registers to allow for memory mapped I/O to custom periphery! That is: 8 bits of data going onto the bus, and 8 bits going out. That is enough for letting 8 LEDs blink or querying the state of 8 push buttons. (If this would have been a commercial product back in the 90s, I would definitely have wanted one! Imagine "V-Techuino" ;-) ). Oh, and the boards are now daisy-chainable! The more boards you add, the more fun there is, of course.

    On the software side I have developed a Serial Loader ROM, which allows code to be sent over a USB-to-serial FTDI cable connected to the V-Tech printer port. Just one click and your code gets compiled, transmitted, relocated, linked and run. Hardware and software development is now much, much quicker!

    I have also been contacted by a chap named Erik Olsen and we might be cooperating on this project from here on. We both dream of having some sort of DOS running on the PreComputer and we have already made some serious progress. Maybe using FRAM or re-purposing GameBoy Flash Carts.... hmmm..

    Stay tuned!

  • Z88DK and SDCC

    Bernhard "HotKey" Slawik08/03/2019 at 15:11 0 comments

    Thanx to the help of some great people at the Z88DK forum (hi alvin!) I was able to add some rudimentary support for the V-Tech Genius Leader / PreComputer to the Z88DK development suite. Just have a look at the platform called vgl to see some of my demo programs. It was quite a hassle for me to get used to implementing the necessary "newlib" I/O functions. Especially so, as they differ slightly for the 1000, 2000 and 4000 series.

    Going forward, though, I recommend using just the simpler SDCC compiler if you want to get started on V-Tech development. You will not be able to benefit from the extensive demos of the Z88DK, but the overall installation and maintenance is much easier when just calling sdcc. The V-Tech headers and includes will be available on this project page or my github page soon.

  • 2017 - Road to Genius

    Bernhard "HotKey" Slawik08/03/2019 at 14:39 0 comments

    So, another late night I searched eBay for "learning notebooks" and instantly got dozens of hits for notebooks by manufacturer V-Tech (well known for its Disney licensed/branded learning notebooks - there are thousands of them on eBay!). I narrowed down my search to the most "serious" and "boring" looking ones, not the colorful and whimsical ones. And that's when I got hooked on the vintage V-Tech Genius Leader series of learning notebooks (known in the US as V-Tech PreComputer or sometimes YENO MisterX)

    Those things go for about 5 Euros on eBay, are available in vast quantities and seem to have big similarities among the different models - there seems to be some sort of proprietary V-Tech "platform" shared among  those devices, and most of them even come with a parallel printer port and/or a mouse!

    I wand to know more!

    I bought all of them.

    "Now this is going to be a real challenge", I thought. Proprietary devices which -I suspect- have only a single "magic" chip-on-die inside them and no official documentation available whatsoever. This could be very challenging, but also very interesting!

    Spoilers: It was interesting :-D

    For days the mail man brought one Genius Leader after the other: 2000, 4000, 4004 Quadro L, 5000, 5005 X, 6000 SL, 8000 CX, ... I started feeling like a hoarder. And so did my friends. But my brother simply called it Nerdophilia :-) Thanx for the understanding, bro!

    I found out that most of the models share the exact same cartridge port design. You normally put new programs in there or add additional memory for the word processor and the built-in BASIC interpreter (yes, they can run BASIC! <3 <3 <3). So the cartridge port is the place I have to put my focus on: When cartridges can transfer data (and maybe program code) to the computer, why shouldn't I be able to do the same (or more)? It's pure logic.

    The most common physical form of cartridge port consists of an edge connector with 2 rows, 18 pins each, so 36 pins in total. The cartridges have the female connector on them, the main board exposes a card edge. Physically, the cartridge side almost resemble an old 5.25" floppy drive connector, except the floppy cable misses 2 pins (1 pin per row), so it is shorter. But that didn't stop me from trying it anyway ;-) I used a hot cutting knife and made the slot wider on one side. Fortunately, by opening up 3 cartridges, I saw that the first 2 pins (pin 1 and 36 by the V-Tech labeling) are not used! So I can just put in my own cable and do not need to care about pins 1 and 36. The plan was to hook up an Arduino and watch what kind of data flows through those 36 (or 34 if you want) wires. There is NO documentation available, so what should I do? Also, the cartridges I opened only contained one single V-Tech branded chip (some proprietary ROM chip?), so no information on what the pins could mean. Well, some of the outer pins are usually GND and +5V, but that's all that's obvious. I eBayed some more and finally bought a Super Speicher 32K -- a cartridge that does not contain a program, but is instead used to store data (BASIC programs or text files from the word processor). So there is no ROM chip inside this cartridge, but must either contain an EEPROM, FLASH or SRAM+battery to be able to hold information. And it was the latter: A coin cell battery and a 32 kilobyte SRAM chip. Lo and behold: Finally, a non-V-Tech branded chip! It's marked LGS GM76C256CLLFW55W and that means it is a Hynix 32K x 8Bit CMOS SRAM. Wonderful! By looking at the data sheet of that chip and how it was connected to the cartridge port, I could easily find out what each pin meant. Or at least 24 of them (GND, 15 address bits, and 8 data bits). That should do for a first test. I used my odd cable contraption, connected it to the notebook and the Arduino and dumped all bits to the Arduino serial monitor. I was prepared to see...

    Read more »

  • Back in 2016...

    Bernhard "HotKey" Slawik08/03/2019 at 14:15 0 comments

    Once upon a late night in late 2016, I stumbled upon a "children's learning notebook" by a German board game company Ravensburger. For only a few Euros I gave in to my curiosity and just bought it. Maybe as a fancy Raspberry Pi notebook case using its original components (screen, keyboard)? I had a lot of ideas.

    It arrived, I switched it on and was happily greeted by a friendly female voice (nice text to speech), inviting me to commence in a round of math quizzes. Cute! I played some rounds, tried out most of the integrated programs, when I suddenly stumbled upon something quite geeky: Productivity programs! There seems to be more to that device than just plain learning games!

    The fact that it comes with an integrated word processor, which has a menu item called PC-Link intrigued me - Could I connect it to another computer? An Arduino? A Raspberry Pi? ESP8266? Well, I did not find any information about the "PC-Link" feature on the internet. I even contacted the company's support directly. And they scanned the original manual and sent it to me as a PDF! Thank you, Ravensburger support!

    But no matter how hard I asked/searched, there seems to be no cable or software available these days. The computer uses a standard 6-pin Mini DIN jack to connect to a printer. I searched eBay and bought it. Then I  shoved some wires into the DIN-port and connected an Arduino between the notebook and the printer. Then I started the word processor, wrote some words and selected "Print" from the menu and watched asthe bits flew between the computer and the printer... I quickly saw that it looked like some kind of SPI protocol. That was fun!

    So this showed me that data transmission is physically possible, and there is some level of hackability to these devices. But what about running own code? I could not find any cartridges (yes, it has a cartridge port) so there is no way of finding ROM dumps to play with. So I first stopped there.

    But wait! There are so many other "learning notebooks" out there! Off to eBay!!!

    (to be continued)

View all 10 project logs

Enjoy this project?

Share

Discussions

pulppure wrote 11/23/2019 at 10:00 point

Would something in the idea of the chipwhisperer be of any help to understand the innards of our little machines ? It is pretty expensive for our aims, so maybe we could build something cheap with arduino or raspi... https://hackaday.io/project/956-chipwhisperer-security-research Also I will try to see what peek and poke commands do in the basic. (edit : they are not available :( )

  Are you sure? yes | no

Evan Allen wrote 11/25/2019 at 15:44 point

I'm working on restoring peek and poke commands to the roms, if you can get your french rom out and dump it that would be the easy way, but I think I can manage a cartridge that you can plug in and it will either dump the internal rom to a serial port or dump it to an SD card.  

  Are you sure? yes | no

pulppure wrote 11/23/2019 at 09:41 point

Hello, yesterday I dug out my french Vtech Genius 4000. I bought it at french salvation army back in 2011 for two euros while picking up some toys for a circuit bending workshop. Later decided that it would not bend properly and was put into storage after the workshop, First, I managed to make it run from nimh batteries, but found some activity buttons did not respond. So I opened it and had a look at the motherboard. I found some insulating cardboard which might be albestos (pretty sad for a kid toys, but if you don't tear it, it doesn't release that much particules) between the battery holder and the MB, so I will replace that, there are also some underneath. There is a little battery leakage, that hopefully did not touch the MB, and I will have to resolder the corroded battery holder. After taking it apart, I did not find the z80 inside, just a Winbond 8ko memory, a Vtech chip, and a bulb chip stuck onto a larger chip like pcb soldered in the middle of  the MB (maybe the z80). Everything is neatly stuck with hot glue the old chinese way, so it's not easy to take pictures (maybe later). Anyway it looks a lot like yours. After putting all back together it no longer powered from batteries, so I dug out a wallwart. Then it still refused to power on, so I had to add some pencil graphite to the traces of the keyboard activity menbrane, that has the power on button. Then it worked, and I also recovered the missing activity buttons on the way. I've tried some basic programming. I've found that it's not compatible with some of the examples I've found on basic learning websites. Anyways I'm amazed at all the progress you've made so far. I'm not much of a hardware tinkerer myself, but I will look forward to try a cartridge, and I will soon provide pictures of  my model's MB.

  Are you sure? yes | no

Bernhard "HotKey" Slawik wrote 10/22/2019 at 15:09 point

@Evan Allen CollapseOS looks EXACTLY like the thing we were looking for! It seems we can save A LOT of work by "just" trying to get CollapseOS to work on the GL! Thank you for the hint! The community already paid off! :-D

  Are you sure? yes | no

Evan Allen wrote 10/23/2019 at 02:47 point

I wonder about having a section of memory that's re-writable and bootable, it would be in the spirit of Collapse OS to have it assemble the operating system and then just boot that.  Maybe a flash rom that doesn't need funky programming voltages.  

  Are you sure? yes | no

Bernhard "HotKey" Slawik wrote 10/28/2019 at 19:16 point

Yes, that would be great. Wither using FRAM or by somehow setting the Z80's "WAIT" / "MEMREQ" / "BUSREQ" pins to slow it down far enough that an Arduino can inject the boot code....? Hmmmm.... Help is greatly appreciated!

  Are you sure? yes | no

Bernhard "HotKey" Slawik wrote 10/22/2019 at 14:53 point

@Evan Allen yes, the missing DIP20 is a "DM 74LS244N". @olsen also wanted to give the retro-fit a try! FYI: The port is not a fully working parallel port. It only offers 8-bit output and 1-bit input. Enough for printing and for a "bit banged" serial connection (which I have successfully working at 9600 baud)

  Are you sure? yes | no

Evan Allen wrote 10/23/2019 at 02:40 point

when I'm back from my business trip I'll want to know values of passives I'm missing.  Here's my board's top side, can you help me fill in the blanks? https://imgur.com/a/Smgf1ar

I'm planning on modifying the power section so I can switch between alkaline batteries and NiMHs and the barrel jack on the back either switching over power or charging the rechargables, also making sure the rom is in MAME

  Are you sure? yes | no

Bernhard "HotKey" Slawik wrote 10/28/2019 at 19:17 point

Thanx for the photo! I have created a "project log" containing a list of the missing components. I hope I haven't forgotten any - let me know if so!

  Are you sure? yes | no

Evan Allen wrote 10/20/2019 at 15:22 point

is the dip20 a 74ls244? My american equivalent is missing that, the parallel port, and some passives/transistors in that circuit and I want to restore the functionality

  Are you sure? yes | no

Evan Allen wrote 10/16/2019 at 15:34 point

I have a precomputer power pad on the way, I think it's the same model you're working with, just available in the United States.  I want to see this thing run CollapseOS

  Are you sure? yes | no

Tom Nardi wrote 08/05/2019 at 02:07 point

Very interesting project. I had several computers like this when I was young, though none nice enough to have the mouse or printer (not for lack of me asking every Christmas, though). Never even occurred to me that they could potentially be put to use.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates