ROB the Robot programming?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

DementedPurple
Posts: 318
Joined: Mon Jan 30, 2017 5:20 pm
Location: Colorado USA

ROB the Robot programming?

Post by DementedPurple »

I want to make a tech demo to show off how ROB the Robot works, but I can't find any resources on how to actually program him. I know how he works, he uses lights that come from the TV. But what colors trigger what reaction? I'd also like to make a Zapper demo. What bit is triggered when the Zapper gets a light signal? What bit is triggered when the trigger is pulled? (And I'm sorry for using the word "Trigger" a lot, It sounds cool.) :roll:
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: ROB the Robot programming?

Post by rainwarrior »

Zapper reference: http://wiki.nesdev.com/w/index.php/Zapper

The wiki doesn't have an article on R.O.B. yet but there's some stuff on it in Noca$h's document:
http://problemkaputt.de/everynes.htm#ro ... atingbuddy
DementedPurple
Posts: 318
Joined: Mon Jan 30, 2017 5:20 pm
Location: Colorado USA

Re: ROB the Robot programming?

Post by DementedPurple »

Man, programming for that thing was hard! No wonder it could only get two different games!
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: ROB the Robot programming?

Post by lidnariq »

Less that it's hard, and more that it's very low bandwidth, has no store/playback ability, and thus isn't that useful...
Pokun
Posts: 2675
Joined: Tue May 28, 2013 5:49 am
Location: Hokkaido, Japan

Re: ROB the Robot programming?

Post by Pokun »

Yeah it's easy to program for once you understand how it works. I had a game idea that would use ROB and the Robot Block parts, but yeah it's quite limited what you can do with it, and the Robot is very slow. The Robot Block parts comes with Stackup for NES which has became very rare in USA due to cannibalism (the cart has a Famicom adapter inside) but I thought the player should be able to reproduce the blocks using PET bottle caps or something (the Robot Gyro parts would be much harder to reproduce). The biggest problem though is that not many people would be able to play my game because they don't have a ROB or Famicom Robot in the first place, and that it would only work on CRT TVs.

I made a Robot Test demo if you search the forum a little. I was much more of a newbie back then though and still didn't understand lots of things, so the code is very messy and may have several misconceptions. I'm planning to rewrite it one day once I have cleared up a few details.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: ROB the Robot programming?

Post by zeroone »

Information is transmitted to R.O.B. serially, one bit at a time, as a sequence of black (bit 0) and green (bit 1) frames displayed at the NTSC framerate of ~60 fps. All bit sequences begin with a 5-bit header: 00010. This is followed by an 8-bit command (transmit left-to-right, most significant bit to least significant bit):
  • $AE - down half-step
    $FB - down full-step
    $BA - left
    $BB - up half-step
    $FA - up full-step
    $BE - close hands
    $EA - right
    $EB - test
    $EE - open hands
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: ROB the Robot programming?

Post by lidnariq »

It's really more of a 4-bit command with clock bits in the middle... 000101w1x1y1z

How you choose to pack that for playback is another question.
DementedPurple
Posts: 318
Joined: Mon Jan 30, 2017 5:20 pm
Location: Colorado USA

Re: ROB the Robot programming?

Post by DementedPurple »

How do you tell ROB to prepare for the next bit? Would you make the screen blue? What I mean is that after you write a bit, how would you tell ROB to get ready to read the next bit?
lidnariq
Posts: 11429
Joined: Sun Apr 13, 2008 11:12 am

Re: ROB the Robot programming?

Post by lidnariq »

The CPU inside R.O.B. already knows when the NES is redrawing the screen; it already has a 50/60Hz clock source from that.

(Inside R.O.B.'s eyes, there's basically something identical to another Zapper)

If you're ever played Gyromite or Stack-Up, and you notice how the screen background flickers between black and green? That's it. R.O.B. is just looking for a bright flash after at least three vertical syncs (60/50ms) of dimness.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: ROB the Robot programming?

Post by rainwarrior »

While we're on the subject, is there any emulator with a "virtual R.O.B." feature?

I feel like a lot of the obscurity of this device could be countered with more readily available ways to simulate it.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: ROB the Robot programming?

Post by zeroone »

rainwarrior wrote:While we're on the subject, is there any emulator with a "virtual R.O.B." feature?

I feel like a lot of the obscurity of this device could be countered with more readily available ways to simulate it.
Do you mean an emulation of the chips inside of R.O.B?
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: ROB the Robot programming?

Post by rainwarrior »

Not really, no. I mean, if you want to dump its programming and emulate its CPU you could use that, but that's a low level detail, and I don't think that really matters to the end user. We're not reprogramming the R.O.B. so whether your emulation does all that stuff at the low level is a bit invisible to the user anyway. All the responses you get from R.O.B. are very coarse. I'm talking about high level emulation of it.

I mean a representation of what it does, its current physical state and how it interacts with you and the game. Maybe done with icons or pictures, or even a 3D model would be really interesting. The screen flashes, and you watch the "virtual" ROB turn or move or press a button on controller 2 or spin up a top, etc.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: ROB the Robot programming?

Post by zeroone »

rainwarrior wrote:Not really, no. I mean, if you want to dump its programming and emulate its CPU you could use that, but that's a low level detail, and I don't think that really matters to the end user. We're not reprogramming the R.O.B. so whether your emulation does all that stuff at the low level is a bit invisible to the user anyway. All the responses you get from R.O.B. are very coarse. I'm talking about high level emulation of it.

I mean a representation of what it does, its current physical state and how it interacts with you and the game. Maybe done with icons or pictures, or even a 3D model would be really interesting. The screen flashes, and you watch the "virtual" ROB turn or move or press a button on controller 2 or spin up a top, etc.
Nintaco simulates R.O.B.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: ROB the Robot programming?

Post by rainwarrior »

zeroone wrote:Nintaco simulates R.O.B.
Ahh! That is really great! Thank you.
User avatar
zeroone
Posts: 939
Joined: Mon Dec 29, 2014 1:46 pm
Location: New York, NY
Contact:

Re: ROB the Robot programming?

Post by zeroone »

rainwarrior wrote:
zeroone wrote:Nintaco simulates R.O.B.
Ahh! That is really great! Thank you.
I just want to mention that I've discovered and fixed a few glitches with the R.O.B. simulation. And, I'll eventually post a new build.

Also, I made Stack Up interactive. It will automatically advance the level when you complete each sequence.
Post Reply