Am cross posting this thread from Sega-16 because it is too cool! Apparently one of the members from Sega-16 created a program that runs the credits "Still Alive" sequence from Portal, using a master-slave configuration and serial communication between 2 Sega Genesi via controller port #2 on both.
Youtube video
The master Genesis runs the master program from a flash cart, draws the text to a monitor, and sends commands to the slave. The slave, which could run it's slave program from another flashcart or from a Sega CD ISO (!), accepts the master's commands to draw ASCII graphics, and displays it on another monitor. Am very curious as to the exact technical details on how this works, especially with the Sega CD option (unfortunately, the author has not given out source code, but only a brief code explanation). My guess is that is he is using a modified Zero Tolerance 2-player network link styled serial interface to communicate between the two Genesi (the Youtube comments hint to this).
So, out of curiousity, what exactly would it take for Sega-to-Sega communications ("S2S" communication ) code-wise, and what other cool things could we do with it ? Has anyone ever done any technical research or demos with the Zero Tolerance 2P serial communication protocal? The only thing I could find about it on Spritesmind was this.
(This thread probably should have been posted under "hardware"...)
"Still Alive" (Sega-to-Sega communication) demo
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 75
- Joined: Sun Jan 04, 2015 10:27 pm
- Location: Pennsylvania
- Contact:
"Still Alive" (Sega-to-Sega communication) demo
SGDK homebrew dev and Unity3D Indie dev.
Sega does what Nintendont!
Sega does what Nintendont!
Person that programmed the demo here.
Sorry for taking forever! I signed up for a spritesmind account about two weeks ago, and I just now got approved.
Initially, I didn't post the source code because I didn't think very many people would care.
Here is the download link for the source code, if you're still interested. I included the master, slave, and slave sega cd code.
https://drive.google.com/file/d/0B-uZnR ... sp=sharing
All you need to do to compile the program, is click the make.bat. No special programs needed. The included 68k compiler is for windows, but I've been able to compile it on linux using wine.
The sega cd version is just a hacky port. It doesn't even display correctly unless you run it on an overclocked system. The reason being, I couldn't get the HBLANK interrupt working on the SEGA CD, so I had to improvise. I'm using the HBLANK to scale the graphics vertically to fill the screen.
Another thing is the communication via the controller ports. I'm just using the standard 3 button controller port reading routine. I think this was causing the high nibble of a sent byte to come out shifted 2 places to the left. I didn't have an everdrive at the time of developing the demo, so I had to do all my testing via porting my code to the sega cd. I didn't want to have to keep experimenting, so I just programmed the demo, accounting for the shift.
I'm fairly sure cutting out the "lsl.b #$2, d7" instruction from the slave program would fix the problem and give you correct communication. But like I said, I wasn't able to do lots of testing, so I just compensated for the shift.
I can answer any questions if you have any.
Sorry for taking forever! I signed up for a spritesmind account about two weeks ago, and I just now got approved.
Initially, I didn't post the source code because I didn't think very many people would care.
Here is the download link for the source code, if you're still interested. I included the master, slave, and slave sega cd code.
https://drive.google.com/file/d/0B-uZnR ... sp=sharing
All you need to do to compile the program, is click the make.bat. No special programs needed. The included 68k compiler is for windows, but I've been able to compile it on linux using wine.
The sega cd version is just a hacky port. It doesn't even display correctly unless you run it on an overclocked system. The reason being, I couldn't get the HBLANK interrupt working on the SEGA CD, so I had to improvise. I'm using the HBLANK to scale the graphics vertically to fill the screen.
Another thing is the communication via the controller ports. I'm just using the standard 3 button controller port reading routine. I think this was causing the high nibble of a sent byte to come out shifted 2 places to the left. I didn't have an everdrive at the time of developing the demo, so I had to do all my testing via porting my code to the sega cd. I didn't want to have to keep experimenting, so I just programmed the demo, accounting for the shift.
I'm fairly sure cutting out the "lsl.b #$2, d7" instruction from the slave program would fix the problem and give you correct communication. But like I said, I wasn't able to do lots of testing, so I just compensated for the shift.
I can answer any questions if you have any.