PCEngineFans.com - The PC Engine and TurboGrafx-16 Community Forum
Tech and Homebrew => Turbo/PCE Game/Tool Development => Topic started by: TheOldMan on December 08, 2010, 04:57:16 AM
-
Does anyone out there know how to tell if a game is running on a TurboExpress vs a regular turbo?
I vaguely remember seeing that it could be done, but never read an explanation of how.
Any help is appreciated.
(And, on the same subject, does anyone know how the link cable works? :-)
-
:-s
-
I think the easiest way would be to...look at the system?
I think I don't understand the question.
EDIT:
OK, wait, I get it. How to program a game to recognize the system version its running on.
No idea, I'm completely retarded when it comes to programming.
-
I'm looking for some documentation on the subject right now but as it's a subject that isn't explored very much at all, information might be hard to come by. Even during its heyday, NEC did very little with the Express.
-
I don't really think there is a way to other than trying to poll joysticks 2, 3, 4, and 5 for input.
When you get right down to it, the Turbob itself only has one controller port too, so I don't see why the Express would have any special indicators saying its an Express. It is just a turbob smashed into a little device.
The link port probably works similarly to a duo-tap only it allows for ONE extra controller.... so if you try playing 5 player bomberman it just wont let you begin the game since all 5 players wont be able to rdy up.
As far as I remember, all of the games that have multiplayer support require you to press Run on all the controllers before the games can even start. I guess thats how you tell if you're on an express or not.
-
It is just a turbob smashed into a little device.
Not at all. Besides having the link port on it, it won't do a screen of 512x256. Max is 320x256, I think. I *might* be able to check that in software.....
The link port probably works similarly to a duo-tap only it allows for ONE extra controller
Again, I doubt it. You can't read 4 lines from a 3 pin connector.
Most likely, the link port is a 3 wire serial connection, -possibly- sent to a latch. In which case it might -look-
like a controller, but would operate differently. One of the things I want to know is how to send stuff out that port (controllers are read only). If I can check the port, I'll know if it's an Express.... (I think)
I'm wondering if thats the strange check in the startup code. Or maybe not.
all of the games that have multiplayer support require you to press Run.....
Can any of you guys who actually tried multi-player Bomberman with two expresses describe how you get into the two player game? That might help me figure this out...
I'm looking for some documentation on the subject right now
Yeah, I started going through the docs I have, but other than an interview with the arcade card dev, where he mentions the lack of hi-res mode on the express, there's not a lot.
I think I'm gonna start looking at the bomberman rom and see how it starts up. Maybe I can find something that will tell me what I want to know :-|
-
Look at Falcon too...
-
The more I think about it, the more sense it makes that the TE would have special controller circuitry that identifies it as an Express. The controller port on a PCE is a read/write serial port that can detect the existence of plugged in controllers even if they aren't actively being used. A device like the Memory Base 128 obviously sends and receives data.
There might be another way for software to detect the system version, but it wouldn't be needed.
-
you guys who actually tried multi-player Bomberman with two expresses describe how you get into the two player game? That might help me figure this out...
Hey, I have an express, you have an express, I have a link cable....
I have bomberman..........
see where Im goin with this? :-D
-
WoW! You're gonna give/loan me an express, a cable, AND Bomberman!!! How Nice!
Seriously, though, we can't even get together long enough to transfer sprite sheets. It's not gonna get any better, either, with Xmas coming up - I'm pretty booked from now till then.
And I think you may have my bomberman; I looked last night and can't find it. <sigh>
If you get a chance, stick bomberman in the express, and see what you have to do to get the multi-player screen/option to pop up. The first step is to find out what triggers that; does the link cable have to be plugged in? does another express have to be connected? etc. I can probably find the screen graphics (especially if I know what I'm looking for), and work backwards to where its loaded. That will tell us where to look for the checks.
And, fwiw:
I'm pretty sure the link cable port is the key to this; even if it shows up as a second controller (which I doubt), it's mere presence would let us know if it's an express or not. (I think).
I chose bomberman to pick on, because the posts here indicate it has a special board to play multi-player on; that makes it easier to track down from both ends - I probably don't have to figure out the whole game, just up to where it loads the board. And bomberman is actually fairly common. It's easier to find two copies of it than two copies of Falcon. But when I actually isolate the express check, I'll go back and check Falcon - I'm betting they used a library function, and the code should be almost the same for all multi-player games :-)
-
nope I own my own bombermans. I didnt borrow yours, lol.
Ill dick with it (bomberman 94) later
-
Does one of you need me to send you my express for testing? It doesn't get much use other than looking purty on the shelf :P Also, I could send bomberman (US) with it too if necessary (or bomberman 93 (also US))
-
Does one of you need me to send you my express for testing? It doesn't get much use other than looking purty on the shelf :P Also, I could send bomberman (US) with it too if necessary (or bomberman 93 (also US))
nah we got it :D
thanks though!
-
It is just a turbob smashed into a little device.
Not at all. Besides having the link port on it, it won't do a screen of 512x256. Max is 320x256, I think. I *might* be able to check that in software.....
Where did you get this information? Of course the screen of the TurboExpress has too few phosphors to show such a high-resolution screen, but then again, it has too few for even a 256x240 screen. "Doing" 512x256 is a function of the Turbo hardware inside the Express.
A while back, I made a screen-testing program (see here (http://forums.magicengine.com/en/viewtopic.php?t=1798)) and I even tested out the max viewable resolution on my TurboExpress. I'll regurgitate it again:
I just did a test with my program on my TurboExpress, and from what I can make out, the maximum viewable area on the Express' screen is 261x238 in low-res mode; 518x238 in Hi-Res mode.
A resolution of NNNx256 is impossible since the VCE hardware maxes out at 242 lines (as far as it can be measured.) With a good video monitor, all 242 lines can be seen, but the TurboExpress actually cuts off 4 lines, making its vertical maximum 238.
-
a pet crusade of mine
Sorry to have stepped on your pet peeve chris.
My original numbers (and please note the 'I think' comment) came from "rec.games.video.* Frequently Asked Questions (part 3 of 3) ". That may not excuse them for being wrong. It's an old document.
In the same document, Section F, is the quote I referred to:
"As for TurboExpress compatibility, I think it can handle the 320x256 mode used
in Y's and others, but I've never tested 512x256... Interesting!"
[Please note: the guy wrote the arcade card libraries, so he knew the hardware. And, according to you, HE got it wrong, too. I guess I can be forgiven for the mistake, then.]
Now, personally, I'm a programmer. I tend to think on powers of 2. But on a practical note, it doesn't matter to me whether the horizontal resolution max is 512 or 565. I'm gonna #define it, and forget about it. Same thing for vertical resolution. Once I look it up and #define it, I'm going to promptly forget all about it, unless I need to change it.
The point, however, was that there *might* be a way to manipulate the display chips to decide if the program is running on an Express or not. I take it from your comments that they use the exact same chips, and looking for a difference there is futile. So do you have any suggestions for locating a useable difference between the Express and a standard TG16?
...
Before anyone else complains....
Yes, controllers are read/write. I forgot about the Devlo setup using the controller port. I can think
of a few ways to hook up the link port that would mimic a controller. But if bomberman can tell the difference, there has to be a way. Maybe they return different values on the initial read ???
...
BlueBMW : Thanks for the offer, but I wouldn't trust someone I met on the internet to return 'borrowed' hardware. But, if you get a chance, put bomberman in your express, and see if you can find the Link game.
Then put it in a regular duo/tg16 and see if it's still there. If we can find out what makes the link game option show up, I have a starting point for finding out how an Express is detected. It would also be nice to have independent verification of the procedure.
Arkhan: I don't think just any bomberman will work - it either needs to be the original, or bomberman 93. I'm not positive, but the thread here indicated that those two versions definitely have the link option.
AND, for those of you who are interested in programming and such....
I started tearing bomber man apart, and though I haven't found the link option, I did find a rather nifty trick.
Apparently, the game uses two satb tables, and swaps between them. Which got me to wondering...Could you use two satb's, swapping them every frame, to get more than 64 sprites??? Granted, the main character would have to be in both, but with a little ingenuity I bet all the other sprites could be different. Makes me wonder about screen flicker, though. (Maybe that's how the flashing bombs are done.) Just a thought someone might want to play with :-)
-
a pet crusade of mine
Sorry to have stepped on your pet peeve chris.
My original numbers (and please note the 'I think' comment) came from "rec.games.video.* Frequently Asked Questions (part 3 of 3) ". That may not excuse them for being wrong. It's an old document.
In the same document, Section F, is the quote I referred to:
"As for TurboExpress compatibility, I think it can handle the 320x256 mode used
in Y's and others, but I've never tested 512x256... Interesting!"
Now, personally, I'm a programmer. I tend to think on powers of 2. But on a practical note, it doesn't matter to me whether the horizontal resolution max is 512 or 565. I'm gonna #define it, and forget about it. Same thing for vertical resolution. Once I look it up and #define it, I'm going to promptly forget all about it, unless I need to change it.
AND, for those of you who are interested in programming and such....
I started tearing bomber man apart, and though I haven't found the link option, I did find a rather nifty trick.
Apparently, the game uses two satb tables...
It's no problem; I linked to that post so people could get a sense of history (of the topic). The Turbo/PCE's VDC/VCE can define its horizontal resolution in increments of 8 pixels and its vertical resolution in individual scanlines, so there is no fixed, standard, or choice of only a few resolutions. Originally, some old docs said there were like only 2 possible resolutions for the Turbo. EGM even printed that the Turbo could do 262x240 but the Supergrafx only 256x192... craziness!
I know you like to #define a single maximum, but (keeping within the specs that don't crash the VCE,) the maximum resolutions it outputs can't be measured definitively using our conventional TV/RGB monitors. Well, the results of my own personal tests are in that post, and so I set those results as theoretical maxima whenever I do programming; other people's mileage may vary.
The guy who did the arcade card docs... I'm guessing that was Dave Shadoff. Yes, he's a real Turbo guru around these parts, and I guess that post was a very early one... back before Charles Macdonald tested the VCE's vertical limits, I guess? One game that could have been a testbench for the 512x24x resolution on the Turbo Express is TV Sports Basketball (it has a 512 res mode).
As far as TE link ports go, I have no ideas about that, but if games can detect a TE, it's definitely through that port (and not by polling video hardware.)
Finally, that nifty trick of alternating sprite tables is indeed nifty, but nothing unique to Bomberman by any means. Games have been flickering sprite tables/entries since the early Famicom (Coleco, even Atari 2600) days. It's popularly(?) called OAM cycling, and is the only viable way to get plenty of objects in a horizontal line if the video hardware limits simultaneous horizontal sprite counts.
-
Arkhan: I don't think just any bomberman will work - it either needs to be the original, or bomberman 93. I'm not positive, but the thread here indicated that those two versions definitely have the link option.
Yeah, I have the link one. Im planning to go grab it in like an hour here after I finish eating and swearing at idiots on FF14. :D
-
BlueBMW : Thanks for the offer, but I wouldn't trust someone I met on the internet to return 'borrowed' hardware. But, if you get a chance, put bomberman in your express, and see if you can find the Link game.
Then put it in a regular duo/tg16 and see if it's still there. If we can find out what makes the link game option show up, I have a starting point for finding out how an Express is detected. It would also be nice to have independent verification of the procedure.
I tried Bomberman in my express and duo. In both instances I can access the link play option from the main menu. I didn't notice any difference between the two systems though. If you try and initiate the connection on the Duo it does nothing. Maybe try tracking down what command is executed when the run button is pressed from the link screen.
-
Games may not be able to differentiate between the Express and console proper at all. If they have a link mode they probably tell the hardware indiscriminately to send a serial handshake and wait for a return. I wonder if the expansion port has pins for the link functionality. Either way, I don't think it's necessary at all for a game to know whether the hardware is an Express or not. If you try link and nothing happens you don't play that mode. If you try the link and everything handshakes OK then you can play.
-
I tried Bomberman in my express and duo.
I plead alzheimers. Or stress. Whichever fits better :-)
After I started trying to figure out how the link stuff was done, I decided maybe I should check to see what it did. And lo and behold, the option WAS on the main menu. I could have sworn it didn't show up until you
put the game in an express..... Goes to show you how often I play bomberman. Or how bad my memory
really is. Take your pick :-)
I'm going to keep going on this, though. Even if there isn't a way to tell the express from a regular duo, I'd
still like to know how the link works. And I always hated games where you went to an option (like linked play),
and it hung until it got a handshake. There's got to be a better way.
(Yes, I can probably use the timer irq to time out the link connection. I just feel thats poor design... )
-
The option always shows but when you try to start a game in Express mdoe, it will ask you to link another Express (or GT). So the Express/GT mode has to be recognized via the link plug.
-
I'm going to keep going on this, though. Even if there isn't a way to tell the express from a regular duo, I'd
still like to know how the link works. And I always hated games where you went to an option (like linked play),
and it hung until it got a handshake. There's got to be a better way.
At least the PCE had a pad-initiated reset, so if you went into link mode on a console unit you didn't have to get up and pop over to the TV to start over. Still, I bet the console expansion port can be hacked for a homemade link cable.
-
The option always shows but when you try to start a game in Express mdoe, it will ask you to link another Express (or GT). So the Express/GT mode has to be recognized via the link plug.
Have we determined yet if there is any game that actually displays a link-mode menu option ONLY on the handheld and not on the console? I still think there is no good way to detect and that the games therefore do no such thing.
-
For shits and giggles, I test drove all the other linkable games on my Duo and 'Express:
Bomberman '93 - acts the same as Bomberman
Columns - link option is grayed out (non-selectable) on both, so I guess it must need another 'Express attached
Falcon - after selecting Head-To-Head, the Duo says "2 TurboExpress Only. Check Cable, Other Machine" and the 'Express says "Waiting For Other Player"
Spin Pair - acts similar to Bomberman
-
Time to start raping the contents of Columns and Falcon.
-
Time to start raping the contents of Columns and Falcon.
Just to bring everyone up to speed... After disassembling BomberMan (the original, NOT 93), it appears that
the link cable -is- read like a multi-tap; in the init section for the pads, it polls all 5 to see which ones are active, then checks the last 4 pads against pad 0, looking for differences. I haven't traced it all the way through (I keep getting distracted by other neat tricks in the code), but it appears that the link cable is actually wired up as a 2 port multi-tap. Maybe I'll get out the security bits, and see if there's an extra chip on the board that matches the one in the multi-tap. Maybe.
Columns - link option is grayed out (non-selectable) on both, so I guess it must need another 'Express attached
This gives me hope. If columns can at least recognize that the link isn't active, then that would be all I would need. Instead of graying out the menu item, I can just ignore it; that way you could only select a link game if the link itself was active to start with. I have a few other tests I'd like to do first, but after I trace down the pad handling in BomberMan, I think Columns and Falcon are gonna be the ones to decipher :-)
--------------------------------------------------------------------------------------------
And, in case anyone is wondering.... Wouldn't it be nice to have Multi-player Insanity on a HuCard (well, okay, flash card) and have it -know- you were using two linked expresses? I'm already thinking about how to add multi-player to it; I don't think linked expresses would be that much different......
-
After disassembling BomberMan (the original, NOT 93), it appears that the link cable -is- read like a multi-tap; in the init section for the pads, it polls all 5 to see which ones are active, then checks the last 4 pads against pad 0, looking for differences.
This just sounds like straightforward multitap code to me... checking to see if a multitap (and several pads) are indeed connected, or if it's a single pad with no multitap. If you hack the game to bypass that check you found, I'd wager it'll start a 5-player game where your P1 pad controls everybody. It's not necessarily link cable code at all.
And remember a link cable is not just a multitap (one-way pad communication). Two TurboExpress gamers aren't playing Bomberman on a single screen. One TE sends its player's position/movements to the second TE along the cable, and the 2nd TE sends its own back to the first. It's a 2-way communication route.
-
This just sounds like straightforward multitap code to me.
Entirely possible that it is. But it appears to count the attached controllers, and elsewhere that controller count gets checked. For a 2.....But, I could be wrong.
And remember a link cable is not just a multitap (one-way pad communication)
That's the same mistake I made at first.
To read a pad, you write the port number and button set you want to the controller. IF there's only 1 pad connected, the pad will ignore the port information. The multitap, however, selects the port and passes the request on to the correct pad; hence it must have 2-way communication capabilities.
(I'm not 100% sure of that, though. I can think of a few ways to do the same thing that don't require that capability. But, as was pointed out to me earlier, the Devlo box does 2-way communication over the controller port. So I think it's safe to assume controllers and the multitap are 2-way, not 1-way)
One TE sends its player's position/movements to the second TE along the cable
Are you sure?
It seems equally likely to me that the link cable could just be acting as a convenient bridge between the two machines, just electrically connecting the multitap chips. So, when you want to read player 2's pad (on the other machine), the link cable just transfers the signals. And the multitap chip in the second machine responds (like a regular controller) with the status of port 1. (Since port 2 isn't active on the second machine).
No, I'm not positive about this, or any of the other link stuff. But it seems to me that that -is- a viable way to do the connection; it's also a cheap way of doing it. Nothing extra required: just add in the multitap chip, swap a few signals, and it works. At least in theory......
Though I do still think the signals have to be converted to and from a serial format somewhere along the line. There doesn't appear to be any other way to send 4 (or possibly 8 ) bits of information across 3 lines without it. But a simple shift-register would work, as one possibility....
-
Apologies to all. I finally tracked through the bomberman code, and hit a few very strange routines....
Does anyone know they layout of page $f7 (I assume its hardware, possibly express specific.) It's definitely
not in the normal addressing range.....
Starting to look like we -may- have a way to recognize an express.....