|
ForumsSega Master System / Mark III / Game GearSG-1000 / SC-3000 / SF-7000 / OMV |
Home - Forums - Games - Scans - Maps - Cheats - Credits Music - Videos - Development - Hacks - Translations - Homebrew |
Author | Message |
---|---|
guy-jin
|
a game proposal - info needed
Posted: Wed Aug 30, 2000 6:05 pm
|
before anything else, i should give 'shouts'
(or whatever the fashionable term is now) to omar, who directed me here after i posted the following on console-dev@egrups.com. here is the message i wrote them. basically, replace 'console-dev' with 'this forum', i'm too lazy to retype the whole thing :-)
|
|
|
Posted: Wed Aug 30, 2000 7:39 pm |
Neato. If you have any questions about z80 assembler, sms programming in general, feel free to drop in again and ask. But, how much time do you have to complete this project? These things tend to be more complicated than they look, especially if you're just getting started with z80 and programming on 8-bit consoles. It took me about 3 weeks just to get my first release of Tetracycline (tetris) to be a recognizable tetris game, and a couple months to make it look nice. And it's still far from finished (well, because I stopped working on it three or four months ago, but anyway...)
You might simply want to redesign the game play to work well on a two button pad before you plan to do anything else. Check out golvelius, which, for most of the game, uses both buttons for the same thing (sword attack). I'm guessing the layout you want is something like: button 1:basic (sword?) attack button 2:use item. start/run/pause/etc:brings up menu for inventory, saving games, maps, etc. To keep it all on the control pad, what you can do is make button 1 the attack button, button 2 the item button, and also bring up the menu if you press and hold button 1, then press button 2 (the menu may come up accidentally from time to time but it doesn't sound so bad). You might be interested to know that the reset button doesn't automatically reset anything. Rather, it's read from the controller port just like it was another button. So you can have the reset and pause buttons both bring up the menu, so it doesn't matter which one you press. If a reset is necessary, have the player go in through the menu. Another option is to do what cyborg hunter/borgman does: pressing a button on controller 2 brings up the menu.
If you're going to do this, I'd recommend at least making it optional, that is, utilitize one of my two schemes above, but make genesis support an option (or arrange for some sort of autosensing mechanism in the genesis to sms adaptor). Ideally, it would just be a simple matter of wiring a y-cable so that the pins that control button a and start would go to buttons 1 and 2 on the sega controller. Unfortunately, I don't think it's that simple. If each 'button' had its own pin the minimum number of pins you'd need would be: up,down,left,right : 4 pins buttons a,b,c: 3 pin start: 1 pin voltage in, ground: 2 pins which is ten pins, and the controller uses a 9 pin connector. As I recall, the directional buttons and b and c coorespond with the usual db9 joystick layout (each with their own pin), for compatibility with many controller ports from the old days. A and Start share a pin, and it's some sort of timing trick to differenciate between them. The sms controller plug can't read that pin nor is there any way to read it in software anyway. so you'd have build a y cable as suggested above, diverting it to a readable pin on controller plug 2. Even then, I'm not sure if it's so easily readable, the pulse cod ethat determines which is being pressed might depend on timing too fine for the CPU to read, at least without wasting tons of time polling the controller data port. I'm not a hardware expert, nor do I remember where to find a description of the genesis' button layout, so I'll defer to other experts here.
as mentioned above, I think it is not the case.
I'd seriously recommend NOT doing that. First of all, many SMS's do not have a card slot. Second, it wouldn't fix the problem of the genesis pads being hard to read, other than allowing for the ability to read that trick pin. You'd need something on there to decode it, which amounts to a complicated of of circuitry. And making a card isn't exactly a hacker weekend project.
How they work: I'll be missing some details here, but roughly: When used as software media format (the usual game cards) they're connectedto the address and data bus just like a cartridge. I suppose one of those custom logic chips on the sms main board senses whether a card is inserted and 'locks out' the cartridge connector if it is. This is my experience, since Iseem to recall that if a card and cartridge is insert and you turn on the power, the card is dominant. I suppose someone who has cards and carts and remembers where in hollerin' hell they left their power supply can test this and find out for certain. When not used as a storage media (i.e. the 3-d glasses, the only peripheral I've ever know of to use the card slot) I'm not sure. I suppose the device is wired so as not to trigger the mechanism that locks the cartridge out of the address bus, and I'm not sure exactly how it communicates with the slot then. possibly it's still wired to 'see' activity on the address bus, but it might be a one way road anyway. Anyhow, definately not worth the trouble. in addition to the card joystick adaptor being a major project unto itself, you'd be writing your game for an audience of one in that case. Furthermore, you couldn't test your game in an emulator, and you definately don't want to use eproms (or flash roms or anything like that) for -each- compilein the development cycle. As I said, I really recommend writing for standard SMS hardware, that would be, cartridges, game pads, etc. That's really part of the appeal. I mean, you can make special analog pads, and put a graphics processor and a 2megabyte SRAM on the cartridge, and require that the player overclock their sms to 20 mhz, and build a card adaptor to connect to an SGI workstation for realtime ray traced graphics and whatever, but then, are you really writing an SMS game anymore? (this post has not been proofread, you have been warned. After the fact, but you have been warned) |
|
|
Posted: Wed Aug 30, 2000 9:08 pm |
Pin 7 of the connector is used for this, IIRC. My understanding was that the state of pin 7 (high or low) determines which pair of buttons (B and C, or A and START) is to be read. The thing is (and this was mentioned to me by Zoop some time ago, but I don't think it's documented anywhere) you can control pin 7 on the SMS as well, in software, via a write to port 3F. So using a Genesis controller on the SMS may not be beyond the realms of possibility. Writing 0xDD to this port sets pin 7 high, writing 0xFD sets it low. (Or it may be the other way around, I'm not quite sure!) The standard SMS controller doesn't use pin 7, but some peripherals (such as the Paddle Controller, and possibly the Light Phaser) use it.
Barry Cantin's Genesis FAQ has a good description of how the controller works (in the section on building your own controller). Mike |
|
|
Posted: Wed Aug 30, 2000 9:58 pm |
Is that so? Hmm. That's quite interesting, I had never heard of that. Now that I think about it, I think the business about funny timing is more to do with reading 6 button controllers. I think maybe it's time to... er, I should make a separate thread for this, actually. so I will. This would be another neat thing to incorporate into a test cart. I wish I could run those myself. The Eproms I ordered are still backordered (as wellas a few others), and I'm guessing what Atani ordered to build eprom burners is also backordered. I did socket a cart, finally. Back to the original point, I still say it'd be best to make genesis pad support optional, and use pause/reset/whatever to bring up menu screens. |
|
|
Re: port 3F
Posted: Sat Sep 02, 2000 6:42 am
|
Sounds like you're the guy to tell me what pins 43 (labelled "JyDs" / "KILLGA") and 48 (labelled "JRead" / "KBSEL") of the cart slot are exactly. And is there anything else that port 3F can do. cheers Mike. a s out. |
|
|
About port 3F and /KILLGA + /KBSEL
Posted: Sat Sep 02, 2000 3:54 pm
|
I'm curious about the port 3F and that signals too ... I was going to try to figure them out by disabling the Z80 CPU in the SMS (By using pin /BUSREQ tied low) and then messing with the address bus and Memory request signal from the control bus ... If you know about them, tell us how it works, then I'll not need to hack the whole thing with wires and switches ... =) Cya ... |
|
|
Re: port 3F
Posted: Sat Sep 02, 2000 4:00 pm
|
Hmm... I don't really know much about the finer points of the SMS hardware, certainly not that which hasn't already been documented. I don't think there are any commercial cartridges or hardware which use those lines. Based on what he's come up with so far, I suspect Vic_Viper may be the man to ask on this one... The port 3F info was provided to me by Zoop. I know a lot of games use this port for country detection also, but aside from this I'm not too sure. Sorry I couldn't be of more help :-) Mike |
|
|
Re: About port 3F and /KILLGA + /KBSEL
Posted: Mon Sep 04, 2000 4:11 am
|
how about that! i was thinking of doing the very same thing, taking control of the bus to work out the exact behavious of Cart_Enable, etc... as for my page system design, i'm abit busy this week so i won't be able to get it to you until next weekend. it's more of a dev_cart than a hack_cart. my reasoning is that it's alot easier and cheaper to replace the ROM in a cart with a 5235 with a DIP socket. a s out. |
|