Forums

Sega Master System / Mark III / Game Gear
SG-1000 / SC-3000 / SF-7000 / OMV
Home - Forums - Games - Scans - Maps - Cheats - Credits
Music - Videos - Development - Hacks - Translations - Homebrew

View topic - a game proposal - info needed

Reply to topic
Author Message
guy-jin
  • Guest
Reply with quote
a game proposal - info needed
Post 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 :-)

Quote
>hello. ive been lurking console-dev for a while.
>(i may have posted before, but if i did, i do not
>remember.)
>
>anyway, i eventually have to do something to
>get my client server programmer degree:
>a computer project. i have been playing with
>half a dozen ideas, but there is only one
>that really applies to this list.
>
>i want to make an adventure game for the
>Sega Master System, similar in style to
>the first legend of zelda game or the
>neutopia games.
>
>why the master system? well, several
>reasons, including that there arent
>many homebrew projects for the SMS,
>that Z80 assembler is at least in
>the same family as pc assembler, my
>favorite portable, the game gear, is
>very similar to the SMS and that it
>could be relatively easily be ported
>to that platform, that SMS carts have
>a lot of room for a huge world, and
>most importantly, having been a
>nintendo sheeple as a child, that this
>would be my pennance to the great
>video gaming company that is Sega.
>
>but there is a problem. the sms
>controller is a bit inconvenient
>when it comes to this kind of game.
>zelda and neutopia made frequent
>use of start/run and select. the
>SMS controller has neither, and
>diving for the console usually
>results, for me anyway, in reseting
>the game and having to start all
>over. yay. :-)
>
>so, if i am going to do a game
>like this, i need to give the sms
>a little better and more flexible
>controller. i have settled on the
>Genesis controller because they
>are plentiful and at least
>partially compatible with the SMS
>already.
>
>but an SMS does not respond to
>Start or A on the genny controller.
>i have imagined two ways to get
>around this:
>
>make an adapter of some sort.
>you would plug a genesis controller
>into it, and plug the other end
>into the two Master sytem ports.
>(i dont wanna destroy a genny
>controller by splitting the cord.)
>since this would be a one player
>game, it does not really matter
>to me that only 1 player is
>possible, but it might matter to
>future console developers.
>
>to do this, i would need to know
>how the genesis controller works.
>anyone here happen to be an expert?
>or know where to find a tech document
>about this?
>
>also, this idea hinges on the
>possibility that each button
>has its own route to the controller
>port, which may not neccesarily be
>the case. is it, off the top of
>your head?
>
>the other possibility is that i
>could mock up a sega card, that had
>a genesis style controller port.
>since it is on a sega card, it has
>the advantage of being a possible
>upgrade - if you really needed to,
>you could put ordinary ram there
>to give the game more breathing
>room, or battery backed ram to
>transport save games, or something
>else i have yet to imagine.
>
>but to do that, i would need to
>know not only how to make a sega card,
>but keep it small, too. i have big
>hands. i dont know if i can do
>that. so does anyone have documents
>or advice about how sega cards work
>or how they can be made?
>
>thanks for taking the time to read my
>hueueueuege post, and thanks for any
>answers or help in advance!
>
>g.f.
 
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Post Posted: Wed Aug 30, 2000 7:39 pm


Quote
> >why the master system? well, several
> >reasons, including that there arent
> >many homebrew projects for the SMS,
> >that Z80 assembler is at least in
> >the same family as pc assembler, my
> >favorite portable, the game gear, is
> >very similar to the SMS and that it
> >could be relatively easily be ported
> >to that platform, that SMS carts have
> >a lot of room for a huge world, and
> >most importantly, having been a
> >nintendo sheeple as a child, that this
> >would be my pennance to the great
> >video gaming company that is Sega.

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...)


Quote
> >but there is a problem. the sms
> >controller is a bit inconvenient
> >when it comes to this kind of game.
> >zelda and neutopia made frequent
> >use of start/run and select. the
> >SMS controller has neither, and
> >diving for the console usually
> >results, for me anyway, in reseting
> >the game and having to start all
> >over. yay. :-)

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.


Quote
> >but an SMS does not respond to
> >Start or A on the genny controller.
> >i have imagined two ways to get
> >around this:
> >make an adapter of some sort.
> >you would plug a genesis controller
> >into it, and plug the other end
> >into the two Master sytem ports.
> >(i dont wanna destroy a genny
> >controller by splitting the cord.)

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.



Quote
> >also, this idea hinges on the
> >possibility that each button
> >has its own route to the controller
> >port, which may not neccesarily be
> >the case. is it, off the top of
> >your head?

as mentioned above, I think it is not the case.

Quote
> >the other possibility is that i
> >could mock up a sega card, that had
> >a genesis style controller port.
> >since it is on a sega card, it has
> >the advantage of being a possible
> >upgrade - if you really needed to,
> >you could put ordinary ram there
> >to give the game more breathing
> >room, or battery backed ram to
> >transport save games, or something
> >else i have yet to imagine.

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.

Quote
> >but to do that, i would need to
> >know not only how to make a sega card,
> >but keep it small, too. i have big
> >hands. i dont know if i can do
> >that. so does anyone have documents
> >or advice about how sega cards work
> >or how they can be made?

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)
  View user's profile Send private message Visit poster's website
  • Joined: 21 Apr 2000
  • Posts: 598
  • Location: Newcastle upon Tyne, England
Reply with quote
Post Posted: Wed Aug 30, 2000 9:08 pm
Quote
> 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.


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.


Quote
> 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.


Barry Cantin's Genesis FAQ has a good description of how the controller works (in the section on building your own controller).

Mike
  View user's profile Send private message Visit poster's website
  • Site Admin
  • Joined: 25 Oct 1999
  • Posts: 2029
  • Location: Monterey, California
Reply with quote
Post Posted: Wed Aug 30, 2000 9:58 pm


Quote
>
> 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!)

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.
  View user's profile Send private message Visit poster's website
  • Joined: 14 Aug 2000
  • Posts: 746
  • Location: Adelaide, Australia
Reply with quote
Re: port 3F
Post Posted: Sat Sep 02, 2000 6:42 am

Quote
> 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.

> Mike

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.
  View user's profile Send private message
  • Joined: 12 Jul 2005
  • Posts: 55
Reply with quote
About port 3F and /KILLGA + /KBSEL
Post Posted: Sat Sep 02, 2000 3:54 pm
Quote
> > 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.
> > Mike
> 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.

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 ...
  View user's profile Send private message
  • Joined: 21 Apr 2000
  • Posts: 598
  • Location: Newcastle upon Tyne, England
Reply with quote
Re: port 3F
Post Posted: Sat Sep 02, 2000 4:00 pm
Quote
> 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.


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
  View user's profile Send private message Visit poster's website
  • Joined: 14 Aug 2000
  • Posts: 746
  • Location: Adelaide, Australia
Reply with quote
Re: About port 3F and /KILLGA + /KBSEL
Post Posted: Mon Sep 04, 2000 4:11 am
Quote
> > > 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.
> > > Mike
> > 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.

> 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 ...


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.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!