v3n0mn33dl3
Moldy Popcorn
public text 4 hire!
Posts: 33
|
Post by v3n0mn33dl3 on Aug 3, 2011 16:10:12 GMT -5
I was just wondering,
would it be possible to connect the arduino to a sega?
so i could send a string of text to the sega?
i've read about serial communication between the sega and a LPT port, so how complicated would this be?
anyone?
|
|
|
Post by Tom Maneiro on Aug 3, 2011 16:51:57 GMT -5
The Genesis/MD has several "communication ports" that you could use: - Controller ports: At least one game (Zero Tolerance) used a custom link cable for multi-system multiplayer. - Serial port (at the rear of the console, AKA "controller port 3"): The Sega Meganet (or whatever it was called) modem, used by a handful of japanese MD titles used this port. Unfortunately, it's only present on very early Model 1 boards (up to VA4 IIRC - later boards came with the port connector unpopuplated on the motherboard, and the in last model 1 VA7? board, the port was totally removed). - The side expansion port for the SegaCD: now we're talking about hardcore stuff Custom hardware may be required. I have no experience with the Arduino though, but it's far more flexible than any PC serial/parallel port, so you can basically roll your own solution on it. It's perfectly doable, but since you're dealing with undocumented stuff, you're pretty much on your own. Anyway, maybe some of the advanced members here could have one or two tips for you. Good luck!
|
|
|
Post by Mairtrus on Aug 4, 2011 10:07:50 GMT -5
What tomman said, except for 2 things: First, whatever controller port can be used for serial communication. The Sega Meganet used the EXT port since nothing else used it, and that left free the controller ports. However, it's not recommended to use the controller ports in serial mode, since you can achieve higher transfer speeds if you implement you own communication protocol with the MD (there are enough pins that can be used for data transfer and handshaking) in parallel mode. And second, the expansion port is more suitable for high speed transfer of data in parallel, and it's not so difficult to manipulate. I made a small plate to control a HDD with only a few OR gates.
|
|
v3n0mn33dl3
Moldy Popcorn
public text 4 hire!
Posts: 33
|
Post by v3n0mn33dl3 on Dec 9, 2016 4:59:27 GMT -5
Ok after 5 years I started thinking about this again. I wrote a small program that waits for Up & Downs from the joypad, it translates to zero's and ones on the screen and after a byte is received it is converted to decimal and than printed as text. I've got the Arduino directly connected to pin 1, 2 & ground on the sega, this way I can even do some sort of handshake. If 1 & 2 are both connected to ground, it reads as a button press 771. after that it wil "listen" for a 1 (257) or a 2 (514). The problem is it is soooo sloooooow. for example I wrote a small program on the Arduino that send 771, (wait 500 microseconds), 257, (wait 500 microseconds), 771, (wait 500 microseconds), 514 (wait 500 microseconds) in a loop. The response on the Sega is a printed 0 & 1.'s and after 4 loops it will translate to a letter "U" (01010101) The problem is I have to wait a 8 miliseconds per byte! So that's why I asked in the ps/2 keyboard thread if someone could explain to me the assembler code. There has to be a faster way! I als tried without the VBLANK, but this gives me all kinds of crazy errors. If I lower the time to e.g. 50microseconds, I get all kinds of strange and missed readings... Also tried not using the joypad function from Bex, but an ASM joypad function I found on the forums but this didn't change much. any help would be very much appreciated. I've added the code, !for testing in an emulator!, so handshake is A. if you want to try this on real hardware, change this to 717, for Up you would use 257 and for down 514. on vblank gosub main enable interrupt vblank end main: 'read joypad state j = joypad(0) 'if Joypad reading not is NULL (and changed since last reading) if j != 0 [and] j != k then k = j locate 0,34 print k;" " 'if A buttons are pressed if k = 64 then handshake = 1 locate line,0 if a = 0 [and] handshake = 1 then print "-" a = 1 else print "|" a = 0 end if endif 'if UP button is pressed if handshake = 1 [and] k = 1 then locate line,countbits+2 Bit$(countbits)="0" print Bit$(countbits) countbits++ handshake = 0 endif 'if DOWN buttonis pressed if handshake = 1 [and] k = 2 then locate line,countbits+2 Bit$(countbits)="1" print Bit$(countbits) countbits++ handshake = 0 endif 'if we received 8 bits then collect en convert to decimal if countbits = 8 then for b=0 to 7 Byte$=Byte$+Bit$(b) next locate line,12 'gosub convert_bin_2_dec line++ if line = 23 then line = 0 'let's cleanup Byte$="" countbits = 0 endif 'end if j != 0 [and] j != k then endif 'end main return
|
|
Deleted
Deleted Member
Posts: 0
|
Post by Deleted on Jan 26, 2017 8:21:24 GMT -5
You can always count on LEFT RIGHT UP DOWN A B C and START. That's 8 on/off states. In other words one 8-bit variable. Why not use that instead of just UP and DOWN? Also, the Atari 2600 and Vectrex crowd have these things called "SaveKey"s. It's a little bit of flash on an I2C bus using a DB9 connection. Maybe some of that could be re-purposed for the 68k. atariage.com/forums/topic/93491-save-key-review/
|
|