Hacking VTech stuff

Posted by pulkomandy on Tue Dec 12 22:11:08 2017  •  Comments (0)  • 

This summer I bought more VTech hardware, namely a V.Smile pocket and a Genius TV Progress (known as Nitro Vision in the US). The latter is quite obscure even by VTech standards and nothing is known about it yet, it's also impossible to disassemble cleanly (case is glued together) so I will order a second one just for disassembling purposes. These are both from 2006, and apparently the last machines from VTech to have a keyboard (the V.Flash/V.Smile Pro does not have one, and later stuff is only tablets. What's the fun in these?)

I previously played around with the Genius PC, an older machine (1998-ish) from VTech based on a 68000 CPU, for which I dumpled the system ROMs. It eventually ended up emulated in MAME and there is ongoing work by other people to figure out the remaining parts of the hardware (mostly, sound output).

For now, let's focus on the V.Smile. It's a quite succesful console for children and thanks to the great work of the Hackmii team back in 2010, we do have some knowledge about the hardware. It apparently uses a Sunplus µ'nSP core, which is not very common but they managed to locate enough docs to get it more or less emulated in MESS.

They mention a GPL-violating version of GCC, but it turns out Sunplus actually does comply with the GPL and dropped the sources of their GCC fork on sourceforge. It is apparently based on gcc 2.95.2 (I can't complain about that, I'm an Haiku developer), and that makes it a little difficult to compile on… well, anything really. Also it is just a source drop without documentation nor compilation instructions.

It took me a while to figure out how to configure the thing, as the configure script does not mention support for the unsp architecture. It turns out, the gcc configure script has a feature for "local" CPUs which we need to use here. On Linux, the command line looks something like this:

linux32 ../unsp-gcc/configure --target=unsp-local --enable-languages=c,c++

The linux32 environment is needed because gcc2 configure script has no idea about x86_64. The enable-language is needed because the objective-C build is broken and I don't care about it anyway (enough obscure stuff already).

The build fails with a complaint from bison that $$ is not ok to use. This is because bison became more strict in some "recent" version. But we can patch the file according to the instructions in some random mailing list post or a more detailed patch from another compiler with the same problem.

There is some more bison-version-related hacking to do, but eventually we get past that with this patch.

Building the compiler on Haiku

As if this was not crazy enough, I also tried to build the compiler on Haiku. It didn't work.

On Haiku we hit a similar problem, but the "local" trick saves us as well:

../unsp-gcc/configure --host=i586-local --target=unsp-local

We get a Makefile in either case. The Linux build fails because Yacc is confused about use of $$. The Haiku build complains about a missing xmalloc.o. It looks like I have more work to do.

Leave a comment

Name: Mail: