Oeka Kids Tablet

Discuss emulation of the Nintendo Entertainment System and Famicom.

Moderator: Moderators

Post Reply
User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

Oeka Kids Tablet

Post by Disch »

Any docs?

Couldn't find one on nesdev (not unless there's a blurb about it in some huge all-in-one doc that I didn't check). Google didn't help much either. I quickly glanced at a few emus sources, but rather than try to decipher them, I'd much rather have a document covering how it works.

Thanks ^^
User avatar
Quietust
Posts: 1920
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Post by Quietust »

I don't have definitive documentation per se, but I do have a working implementation in my emulator, and it works something like this:


Write $4016:
D0 - Strobe, but inverted (write 0 to latch, write 1 to read data back)
D1 - Advance bit (write 0, 1, then read $4017), only valid when D0=1

Read $4017:
D2 - 1 if $4016.1 is clear, otherwise 0
D3 - Inverted serial data from latch if $4016.1 is set (returned upper bit first), otherwise 0
Note that you must account for the fact that strobing 4016.0 (0>1) and setting 4016.1 will advance the bit counter - this should cause it to advance to the first bit.

Data format:
xxxxxxxxyyyyyyyyba
a - 1 = "click" (press down on tablet surface?)
b - 0 = cursor is in top bar and not being clicked (1 otherwise)
yyyyyyyy - Cursor Y position, scaled to 0-255 (for emulator, take mouse.Y within 0-239, subtract 14, then multiply by 256/240)
xxxxxxxx - Cursor X position, scaled to 0-239 (for emulator, take mouse.X within 0-255, add 8, then multiply by 240/256)

The "subtract 14" and "add 8" were derived by disassembling the game's joypad code and reversing the transformations it performs on the input (by which it converts to on-screen coordinates).

One note - in order for the button panel at the top to work nicely, you need to click, hold, and then move the cursor at least 1 pixel before you release. This may itself be a bug in my implementation, but it's fairly minor.
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
User avatar
Disch
Posts: 1848
Joined: Wed Nov 10, 2004 6:47 pm

Post by Disch »

Thanks!

After a lot of tinkering and messing around and debugging, I got it working.. although the 'click' sees a little unresponsive. There's a game where you click and drag puzzle pieces from one side to the other, and I can do it, but it doesn't want to "let go" of the pieces when I release the click. I've noticed this in NEStopia and Nintendulator as well, though.

I'm thinking it's just a side-effect of using a mouse instead of an actual stylus. You probably aren't expected to hold the button the whole time -- rather you just lift your pen when you want to release whereas, you can't lift the mouse -- so when using a mouse it feels as though you're dragging.

I see what you mean with the buttons at the top of the screen -- but I find I don't have to move the mouse at all in order to make them register -- although you do have to hold the button for a while (a quick click won't cut it). Moving/dragging the mouse doesn't seem necessary though -- but doing so makes you hold the button longer, which is probably why it seems to work.


Also -- to theorize and speculate (I could be waaaaay off base here) :

Perhaps the 'b' bit is a "stylus touching tablet" indicator (1=touching, 0=not touching). I couldn't make much sense out of its logic before looking at it that way.

I don't know what the actual tablet looks like (google image search has failed me) -- but I'm guessing it's a sort of pen that has a tip which pushes in when pressed and a rectangular surface with 7 stationary buttons across the top (above the actual drawing surface)

This would explain why the game exits the title screen once 'b' is set (starting the game would happen by simply touching the pen to the tablet -- but a full 'click' isn't necessary. I find it hard to believe that the actual game flashes the title screen as quickly as is done in emulators)

Also strangely, the games don't seem to look at the 'a' bit for the top 7 button presses -- only the 'b' bit is significant.

I would almost be willing to bet money though, that the top section is not part of the surface available to the main part of the tablet. This would explain why the Y position doesn't matter when you click in the top portion -- and why the X position is approximated (clicking between two buttons works). [edit] Either that, or there's some sort of protective thing over the top part of the tablet with 7 holes in it for the buttons. Man I would really love to see a picture of this thing [/edit]

I'm thinking of redoing a chunk of my tablet emulation with this in mind (maybe allow a way for the user to touch and release the tablet without actually pressing the button) just to see how it pans out. It certainly makes a whole lot more sense to me this way, though.


EDIT -

yeah.. treating 'b' this way really works out well. I'd put money on that being what that bit is for.
Drag
Posts: 1615
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Post by Drag »

My apologies for the 6 year bump, but as a kid, I had a V-Tech Video Painter (the original model), and by looking at this Oeka Kids tablet, the two seem to be pretty similar.

On the Video Painter, you can touch the stylus to the tablet surface, and a little on-screen cursor will appear, but you don't actually "draw" anything until you hold down a large red button on the tablet itself (which is similar to the Oeka Kids' "click"). Alternatively, there's something like a "caps lock" button which changes the tablet's behavior such that touching the tablet surface is automatically considered a "click", and the Oeka game has a software option that does the same thing.

I was able to find a picture of the box here:
http://www.nakoko.com/uploads/items/258 ... _75318.jpg, or by searching "oeka kids tablet" on google.

I don't see any "click" button on the Oeka tablet, but the "click lock" feature in the game shows the bottom part of the tablet highlighted, so maybe that gray bar is the click button.
nocash
Posts: 1405
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Post by nocash »

Good point. I was thinking that it could separate between soft & hard pressure, for "touch" and "click" accordingly.
But now that you mention the button... I guess you are right... the japanese manual does actually show a picture with a hand on the gray bar: http://www.nakoko.com/gallery/show/25825/name
Does anybody have a real Oeka Tablet at home and can tell how it works? Or can translate the "click" related part of the manual?
zzo38
Posts: 1096
Joined: Mon Feb 07, 2011 12:46 pm

Re: Oeka Kids Tablet

Post by zzo38 »

Idea for emulation using mouse: Left button to touch, right button (or space-bar, if this is preferred) to click.
(Free Hero Mesh - FOSS puzzle game engine)
User avatar
krzysiobal
Posts: 1037
Joined: Sun Jun 12, 2011 12:06 pm
Location: Poland
Contact:

Re: Oeka Kids Tablet

Post by krzysiobal »

Russians shared photos of this tablet (google translate engine does not work well with photos on their site)
https://translate.google.com/translate? ... 560.0.html

Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image Image


So we have a chance to see what is going on here. According to https://www.instructables.com/4-Wire-To ... h-Arduino/, interfacing with such resistive touch screens is just a matter of applying +5V/GND between one pair of terminals and reading a voltage from either wire of the other pair (this will give one coordinate). Doing the same job witch exchanged pair gets the other coordinate
Image
Image

There are two analog muxes and a micro (TMP47C242) that does all the job. I did not found in the datasheet single word how it is programmed, so probably during the manufacturing process and there is no way to read the code back (unless there is some undocumented feature of reading back or programming or of course decapping)
Image Image Image

Depending on how the MUXes are driven (BA), it reads one direction (00) or the other (01).
When BA=10 then the ADC sees +5V and when BA=11 it sees GND (maybe some kind of feedback if the touch screen works properly or just a voltage reference for calibration or to see if the stylus is touching it ).

Code: Select all

BA | TOUCH1 | TOUCH2 | TOUCH3 | TOUCH4 | ADC in micro seed
---+--------+--------+--------+--------+-------
00 |100R@VCC|  GND   |        |        | TOUCH3
01 |        |        |100R@VCC|  GND   | TOUCH1
10 |  GND   |        |3.6k@VCC|        | TOUCH3
11 |        |  GND   |3.6k@VCC|        | GND
Attachments
TMP47C242.pdf
(831.4 KiB) Downloaded 62 times
nocash
Posts: 1405
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Oeka Kids Tablet

Post by nocash »

I've the software protocol documented here, http://problemkaputt.de/everynes.htm#controllerstablets - that's based on examining the .nes ROM image, and on descriptions found in the internet (I didn't have had PCB photos or schematics back then).
The main problem was (or still is) understanding the 17th and 18th data bits. As far as I remember, somebody told me that one can push down the front edge of the case to trigger a button. So I guess one of the bits is touchscreen pressed flag, and the other one is a simple push button.

Looking at the photos... there are two two daughterboards, one is shown to have a button on the "back" side, the "back" side of the other one isn't shown on the photos, but it seems to be wired to the same pins, so it must be just an alternate button (to ensure receiving the button signal no matter if the user is pushing the front, or front-left, or front-right).
Looking at the schematic... you seem to have drawn that as a single switch symbol, marked "SW1 LEFT/RIGHT"? It would be clearer when drawing two separate buttons, and using button symbols instead switch symbols. When gazing at the schematic alone, I would currently interprete it as a switch for left- or right-handed use (whatever that could be good for).
homepage - patreon - you can think of a bit as a bottle that is either half full or half empty
Post Reply