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 - 315-5237 Technical (Long)

Reply to topic
Author Message
  • Joined: 19 Dec 2005
  • Posts: 34
  • Location: United Kingdom
Reply with quote
315-5237 Technical (Long)
Post Posted: Mon Dec 19, 2005 7:38 pm
SEGA 315-5237 ASIC

This document provides the pin-out & connection details for
a SEGA 315-5237 ASIC as used in a SEGA Master System II Power
Base PAL-I, Model Number 3006-05, with SEGA IC Board M4Jr PAL,
board number 171-5922A (C) SEGA 1990.

All component references throughout this document are taken
from the actual circuit board silk screen and will not agree
with the SMS schematics published on SMS Power.

Part and pin numbers will be seperated by hyphens (-) for
example:

  • CN2-1 = connector 2 pin 1
  • C5-23 = IC5 pin 23

 JYDS           ( 1)        (48)  VCC
 A0             ( 2)        (47)  !POR
 A6             ( 3)        (46)  !RST
 A7             ( 4)        (45)  * GND
 !WR            ( 5)        (44)  * C15/NC
 !RD            ( 6)        (43)  OSC IN (53.2034 MHz)
 !IORQ          ( 7)        (42)  RGBCLK (OSC/12, 4.434 MHz)
 !MREQ          ( 8)        (41)  315-5246 CLK (OSC/5, 10.64 MHz)
 !CSRAM         ( 9)        (40)  * GND
 CN2-1 JOY1 UP  (10)        (39)  !BIOSROM_CE      (!CE0)
 CN2-2 JOY1 DN  (11)        (38)  !BASERAM_CE      (!CE1)
 CN2-3 JOY1 LE  (12)        (37)  * C11/NC         (!CE2 ?)
 CN2-4 JOY1 RT  (13)        (36)  !CARTROM_CE      (!CE3)
 CN2-6 JOY1 TL  (14)        (35)  * C13/NC         (!CE4 ?)
 CN3-1 JOY2 UP  (15)        (34)  315-5246 PIN 24  (HV_LATCH)
 CN3-2 JOY2 DN  (16)        (33)  * VCC
 CN3-3 JOY2 LT  (17)        (32)  D0
 CN3-4 JOY2 RT  (18)        (31)  D1
 CN3-6 JOY2 TL  (19)        (30)  D2
 CN2-9 JOY1 TR  (20)        (29)  D3
 CN2-7 JOY1 TH  (21)        (28)  D4
 CN3-9 JOY2 TR  (22)        (27)  D5
 CN3-7 JOY2 TH  (23)        (26)  D6
 GND            (24)        (25)  D7


Notes:

JYDS - Joysticks Disabled Signal (pin 1)

This is the output from port $3E bit 2 and it is this signal that appears at
the cartridge port CN1-43.


!POR - Power On Reset (pin 47)

This pin is taken low by a diode clamped RC network (D1, R4, C18) on power up.
As the RC network charges the signal will rise to and remain at logic 1 until
the power switch is recycled.


!RST - System Reset Pulse (pin 46)

A buffered version of the !POR signal. This signal is distributed as follows:

  • Cartridge Port CN1-46 - may be used to reset mapper chips
  • Z80 CPU IC2-26 - chip reset
  • 315-5246 Main ASIC IC5-23 - chip reset

DO NOT CONFUSE THIS SIGNAL WITH THE RESET BUTTON!


OSC IN - Master Oscillator Input (pin 43)

This version of the board is fitted with 53.2034 MHz crystal oscillator as the
master timing reference. This master clock enters the ASIC here to be divided
down and redistributed to the various components.


RGBCLK (OSC/12, 4.434 MHz) - CXA1145 Clock (pin 42)

This output pin provides the reference clock for the CXA1145 RGB encoder,
IC9-6. The master clock is divided by 12 to produce the 4.434 MHz signal
required for PAL systems.


315-5246 CLK (OSC/5, 10.64 MHz) - 315-5246 Reference Clock (pin 42)

This output pin provides the reference clock for the 315-5246 VDP/PSG ASIC,
IC5-35. The master oscillator is divided by 5 to produce a 10.64 MHz clock
which is further divided by 3 in the 315-5246 VDP/PSG ASIC to produce the
3.546 MHz CPU clock.

This explains some of the timing and psg frequency discrepancies between
the SMS II and the SMS I. The Mk1 used a 10.725 MHz crystal which, when
divided by 3, produces a 3.575 MHz CPU clock while the NTSC clock required
by the CXA1145/MC1377 is 3.579 MHz.


* C15/NC - Unknown (pin 44)

Pin 44 is connected to a 100pF ceramic disc capacitor whose other leg is
connected to ground. This is assumed to be another clock divider output
which may be available only in NTSC mode. No signal was detected during
testing.

Assuming that SEGA planned for the use of the same components in both PAL
and NTSC models then by using a 53.7 MHz master oscillator in NTSC units
the divide by 5 output fom pin 41 will provide 10.74 MHz for the PSG/VDP
ASIC, IC5-35, which in turn will divide by 3 to provide the 3.58 MHz CPU
clock etc.

So we need to divide the master clock by 15 to get 3.58 MHz from this
ASIC. I am guessing that this pin is the divide by 15 clock and would
require the setting of an NTSC/PAL link, possibly changing either pin
45 or pin 40 to VCC to re-route the clock internally.

There is also the posability that the NTSC unit just feeds the 3.58 MHz
CPU clock directly from the VDP/PSG ASIC to the CXA1147/MC1377 but I'm
guessing this isn't done (it wasn't done in the MK1) probably for noise,
imeadance matching, or output load reasons.



* VCC - Unknown (pin 33)

Pin 33 is connected directly to VCC. I suspect that this is the 'Reset
Button' input, hence the need to tie it to VCC for compatability. This
would also explain why bit 4 of port $DD always reads as '1' on this
model.

I seem to recall a reset button mod that mentioned pin 33. The problem
with attempting such a mod on this board is the need to sever the pin
from the board as the track appears to be under the chip on the component
side of the board. Had a pull up resistor been used instead then things
would have been a lot easier.


* GND - Unknown (pins 40 & 45)

These are possibly the CONT1 input and the PAL/NTSC switch. The only
problem here is that Charles MacDonald's SMS/GG Hardware Notes clearly
state that bit 5 of port $DD always returns a 1 on an SMS II and GG. The
CONT1 pin, CN1-34, on this model has only a short track leading from the
cartridge connector which ends in a solder filled via (i.e. not connected)



Request for further info

I would be interested to here from anyone with an NTSC version of an
SMS II with a 315-5237 ASIC who can validate any of these theories
regarding the clocks and PAL/NTSC switching.

I would also be interested to know if the 315-5237 was used in an
earlier model with the reset button and/or CONT1 connected. If so
then to which pins?

Regards
Marty
  View user's profile Send private message
  • Joined: 14 Aug 2000
  • Posts: 800
  • Location: Adelaide, Australia
Reply with quote
315-5237 Technical (Long)
Post Posted: Wed Dec 21, 2005 1:17 am
Nice work.

I have 2 original SMS, one with the old chipset (as per schematics by Gringos in the dev section) and another with the new chipset, as in the SMS II. I'll do some testing and check out your findings over christmas. I don't have a frequency counter to exactly check the frequencies but I should be able to get something with the oscilloscope.

asynchronous.
  View user's profile Send private message
  • Site Admin
  • Joined: 19 Oct 1999
  • Posts: 15641
  • Location: London
Reply with quote
Post Posted: Wed Dec 21, 2005 9:11 am
I fixed up some of the formatting in the original post. I can actually understand most of this, so it must be good :)
  View user's profile Send private message Visit poster's website
  • Joined: 14 Aug 2000
  • Posts: 800
  • Location: Adelaide, Australia
Reply with quote
315-5237 Technical (Long)
Post Posted: Wed Dec 21, 2005 1:23 pm
OK, I haven’t done any testing yet, but I had a better read (as opposed to a quick glance) and noticed the following:

JYDS (pin 1 on IC4; pin 43 on cart slot) – you say it’s an output but I think it is an input.

From memory I don’t think its state reflects bit 2 of port 0x3E. The joystick ports (0xDC, 0xDD) can be disabled by either a software write to I/O port 0x3E bit 2 or by hardware asserting this line. This would allow hardware plugged into the slot to disable the slots in the upper I/O range from 0xC0 to 0xFF and allow the CPU to read the I/O ports of the device instead of the joystick ports. It’s also high impedance – doesn’t source any current like an output.

Example: I could make a cart with a serial port for the SMS and map the I/O ports of the UART to a base I/O address of 0xE0. When the CPU performs an I/O read from the UART I/O ports the logic inside the serial port cart can assert the JYDS line to prevent joystick data being output and read by the Z80. The joystick ports could be read like normal using ports 0xDC and 0xDD. (This may be a bad example, but imagine a SMS with a RS232 serial port!)

Pin 48(JREAD) which is generated by the VDP/PSG IC5 denotes an I/O access in this address range (0xC0 to 0xFF) and helps the logic decoding process.

I’ll confirm and refresh my memory over the Christmas break.

Pins 35 and 37 of IC4 are the /CE lines from the Expansion slot and the card slot that are not present on the SMS2.

Pin 33 is the Reset Button input that is not present on the SMS2 either.

To be continued…

asynchronous
  View user's profile Send private message
  • Joined: 19 Dec 2005
  • Posts: 34
  • Location: United Kingdom
Reply with quote
Post Posted: Wed Dec 21, 2005 7:41 pm
Firstly, thank you to all of you for taking the time to read my document and the prompt replies.

Maxim, thanks for reformatting the message. For some reason the text edit box in the create new message page was half way out of my browser and I couldn't see what I was doing so I resorted to a cut and paste from a text document. I am having no such problems with this reply though? Must have been my browser having a bad day.

My compliments on such an informative and outstandigly well presented site. I have been lurking for quite some time and I'm impressed by the breadth of coverage offered. Not just another 'ROMZ' site but good technical coverage by people who obviousl know and care about the Sega 8 bit machines. Sorry if I'm getting off topic here.

Asynchronous, regarding JYDS. I've had a good think about this for some time. If, as you suggest, this is an input then why bother with disabling the port $3E bit 2? I only did crude testing with a multimeter and it read 0 volts, which it would anyway if it was an input. I don't have a logic probe (I must build one) so I can't verify if it's Hi-Z. If it is Hi-Z then it could well be !KILLGA may be a more appropriate term as pulling the line down to 0V to 'kill the game adapter' is what could be happening.

Usually, Hi-Z lines are pulled up to VCC though to prevent illegal voltage levels and transients. Take a look at the resistor array pulling up pins 2~9 incl on this IC as an example.

I plan to rig up something to bit bang the board over the christmas period. My intention is to generate a !BUSRQ to Hi-Z the cpu and mess around with the bus signals to get a more definate understanding of the logic equations. I will, of course, post my results.

It was just that I assumed the easiest way for an external device to avoid bus contention would be to include JYDS in it's selection logic i.e. if the address is in range and the joystick port is disabled then the cpu is talking to me, otherwise the cpu wants the joystick ports.

A serial port on an SMS is a great idea and perfect for debugging. It is also a project that I would love to build.

Thanks for the confirmation on the RESET and the CE lines. Much obliged.

Regards
Marty
  View user's profile Send private message
  • Joined: 14 Aug 2000
  • Posts: 800
  • Location: Adelaide, Australia
Reply with quote
Post Posted: Thu Dec 22, 2005 1:02 am
Why bother with disabling the port $3E bit 2?

This is a purely software method of disabling the joypad port, read, a method that requires the Z80. By providing a line to the cart port for devices to use, this is a pure hardware way of disabling the joypad ports.

The I/O ports are only partially decoded as you've probably noticed, using A0, A6 and A7 only and not the full 8 lower address lines. Setting bit 2 in port 3E disables the joypad ports and thus frees up the ENTIRE I/O space between 0xC0 and 0xFF. Using the hardware method the joypads can be disabled for a small part of that range and still be accessible and used in a game for instance. It's like an 'automatic' way the the device to disable the joypad port where it needs them disables without requiring the Z80 to write to port 3E before and after each access to the device. I think the whole purposes of being able to disable the joypad ports is to allow this I/O range to be used for external expansion hardware.

From memory the input is actually active high, ie assert high to disable the joypad ports. Inputs are not always tied high as you say. They are tied high or low depending on the logic state you want to 'fix' the signal in. So its low by default to enable the joypad ports by default. Many a data bus are tied high like you observed.

In terms of the hardware operation, think very simply for the SMS: The JREAD signal denotes a I/O read or write to the "I/O expansion range", and the JYDS signal lets the device use this range how it want. The other signals (CE, CSRAM, EXM1 and 2) all work in a similar, simple fashion.

I wrote a small progam that allowed me to write data to ports 3E and 3F and tested it that way. The progam also read the other ports an displayed the results onscreen. I think it was 1~2kB.

I really have to document and post all my info/knowledge on the hardware...

asynchronous.
  View user's profile Send private message
  • Joined: 28 Sep 1999
  • Posts: 1200
Reply with quote
Post Posted: Thu Dec 22, 2005 7:15 am
asynchronous wrote
Why bother with disabling the port $3E bit 2?


FWIW, Enri's schematic of the Mark-III FM unit proves the joystick disable pin is an input:

http://www2.odn.ne.jp/~haf09260/Mark3/Fm70.htm

To my knowledge it functions exactly as asynchronous has described.
  View user's profile Send private message Visit poster's website
  • Joined: 19 Dec 2005
  • Posts: 34
  • Location: United Kingdom
Reply with quote
Post Posted: Thu Dec 22, 2005 6:44 pm
Thank you gentlemen for the link to Enri's schematic of the Mark-III FM Unit. As you say this is clearly an input to the system.

/KBSEL gates /RD and A2 into IC2 (decoder) if /RD and A2 are both low then /Y0 will be low forcing a preset on IC3 (overriding the hard wired reset) forcing the Q output high - which is put on the bus as JOYKILL.

This Logic 1 also switches the lower pair of bilateral switches (bow ties) 'ON', placing a ground (logic 0) onto data lines D0 and D1. I assume that this is how the circuit is detected by the system.

I don't have a scope to test for race conditions in the hardware but I can see a potential problem. The following is the sequence of events that must occur.

1. You select a read in the range of both a custom peripheral and the joysticks.
2. The address signals must propogate through the 315-5237 before the joystick data will appear on the bus.
3. The address signals must propogate through the custom decoder before they can generate JYDS.
4. The 315-5237 must disable the joystick port in response to JYDS.
5. Custom device places data on data bus.

Depending on the propogation delays the custom hardware may not respond in time to be read by the Z80 or may alter the data during the read cycle

In order to design custom hardware the propogation delays within the hardware to generate JYDS must be less then the delays within the 315-5237 that place joystick data on the bus.

I will need to read the Z80 specs to see what the timing requirements are for an I/O read cycle and check some typical decoder data sheets for their propogation delays.

The Z80 has quite a wide margin for an I/O read cycle (relative to a decoder's propogation delay). I am more concerned with momentary bus contention. If both the joystick data and the custom data are on the bus simultaneously, even for a nanosecond or two, this can stress the circuit and reduce reliability.

Hmm.... More head scratching needed.

What I had meant by 'Why bother with disabling the port $3E bit 2?' was that I thought it strange that two methods of disabling the joystick reads was being provided - since the one of the reasons for the re-design was cost cutting. I suppose some things had to be maintained for compatability since the chip is used in other systems too.

It would have also avoided any possability of race conditions as laid out above.

Back to the test pobes.

Regards
Marty
  View user's profile Send private message
  • Joined: 14 Aug 2000
  • Posts: 800
  • Location: Adelaide, Australia
Reply with quote
315-5237 Technical (Long)
Post Posted: Thu Dec 22, 2005 10:55 pm
I haven't really studied enri's schematic so I can't comment on it's operation.

You are correct in that there may be bus contention because the /RD strobe is used to generate JYDS. This wouldn't be a possible issue if the circuit only used the address lines and /IORQ or JREAD because there signals are asserted 'long' before the /RD is in a I/O cycle, and IC4 probably outputs joystick data as soon as /RD is asserted (with propagation delay of course).

The key timing issue is how fast IC4 responds to JYDS versus how fast the custom hardware works in terms of placing data on the bus. As long as the custom hardware outputs data later that IC4 responds to JYDS it will be 'ok'.

As for stress on the hardware, meh! Let the current limiting and diode clamps take care of that. =o)

Now I'm thinking of generating some timing diagrams for all the signals and how they respond, like propagation delays for CE's, CSRAM, EXM1 and EXM2, JYDS, JREAD...that would be "cool" for developer-like people.

asynchronous.
  View user's profile Send private message
  • Joined: 19 Dec 2005
  • Posts: 34
  • Location: United Kingdom
Reply with quote
Post Posted: Fri Dec 30, 2005 4:24 pm
Chip Select Logic

All findings are based on a SEGA IC BD M4Jr. PAL part number 171-5922A as fitted to a SEGA Master System II Power Base PAL-I Model No 3006-05.

The SEGA 315-5237 ASIC includes the Memory Control Register mapped to even I/O addresses in the range $00 to $3F inclusive. This register permits the selection of memory and joystick enables.


    MSB                                                     LSB
 +-------+-------+-------+-------+-------+-------+-------+-------+
 |  ___  | ____  | ____  |  ___  | _____ |  ___  |       |       |
 |  EXT  | CART  | CARD  |  RAM  | OSROM |  JOY  |   X   |   X   |
 |       |       |       |       |       |       |       |       |
 +-------+-------+-------+-------+-------+-------+-------+-------+

                    PORT $3E - MEMORY ENABLES


Where a Logic '0' enables a specific selection and a logic '1' disables a specific selection.

The output of this register is NOT fed directly to the external pins but is instead gated with other signals.


!OSROM - bit 3, pin 39 (!BIOSROM_CE, !CE0)

!OSROM is gated with !MREQ (pin 8) such that when both !MREQ and !OSROM are low (logic 0) then !BIOSROM_CE (pin 39) is low.

Be aware that the chip select logic does not validate the address. The chip select pin will be asserted, logic 0, on every memory request if the corresponding Memory Control Register bit is set.


!CART - bit 6, pin 36 (!CARTROM_CE, !CE3)

!CART is gated with !MREQ (pin 8) such that when both !MREQ and !CART are low (logic 0) then !CARTROM_CE (pin 36) is low.

Be aware that the chip select logic does not validate the address. The chip select pin will be asserted, logic 0, on every memory request if the corresponding Memory Control Register bit is set.


!RAM - bit 4, pin 38 (!BASERAM_CE, !CE1)

!RAM is gated with !CSRAM (pin 9) such that when both !RAM and !CSRAM are low (logic 0) then !BASERAM_CE (pin 38) is low.

!CSRAM is generated by the 315-5246 ASIC (IC5) when both A15 and A14 are high (logic 1) and !MREQ is low (logic 0).

To prevent bus contention between RAM an ROM when !MREQ is asserted (logic 0) the output enable pins of the RAM and ROM are controlled using seperate logic.

The RAM !OE pin (IC3 pin 22) is directly connected to the CPU !WR line (IC1 pin 22). Whereas the OS ROM !OE pin (IC2 pin 22) is controlled by !EXM2 (IC5 pin 12).

!EXM2 (aka !M0-7) is asserted (logic 0) by IC5 when both A15 and !MREQ are logic 0.

All cartridges examined by myself so far use !EXM2 for output enable.

Take particular note that there is nothing in hardware to prevent multiple ROMs from being enabled at the same time. Nor is there any hardware preventing any attempt to write to ROM address space.

Under normal operation the Memory Control Register is set by the BIOS and there is no requirement for user code to interfere with the memory enable bits.


!CARD - bit 5, pin 37 (!CARDROM_CE, !CE2)
!EXT - bit 7, pin 35 (!EXP_CE, !CE4)


Not used on SMS II Power Base PAL-I unit. Assumed to function as per BIOS ROM and CARD ROM CE lines.

Joystick logic to follow.

Comments, observations and suggestions appreciated.

Regards
Marty
  View user's profile Send private message
  • Joined: 14 Aug 2000
  • Posts: 800
  • Location: Adelaide, Australia
Reply with quote
315-5237 Technical (Long)
Post Posted: Fri Dec 30, 2005 6:27 pm
This is good work, really, you've definitely got the tech know-how, but it's been done before: most if not all of it is documented in dev documents section, or in previous forum posts (searchable apparently). There are forum extracts on the operation of ports 3E, 3F and how they function in relation to the joypad ports.

On the BIOS inside the SMS; it's not a pure EPROM, it's a masked ROM that contains a ROM and mapping hardware with a slightly different pinout to a normal EPROM. Same with the Carts. I can go further if you want to know more about it and some issues I know of.

I had a chance to have a look at the clock signals and pin 41 is the VDP clock at 10.64MHz (double the 'pixel clock'). Pin 42 is actually the CPU clock and runs at 3.55MHz (osc/15). The NTSC SMS runs slightly faster at 3.58MHz with a slightly faster XTAL than the PAL version. This is why there are glitches when a PAL SMS is switched to NTSC mode.

Pin 44 might be just an XTAL input that is used with a crystal and not with a xtal can. I can't tell because my oscilloscope can't 'see' a 53MHz signal. The grounds might just be dedicated grounds for the XTAL, logic, and the like.


asynchronous.
  View user's profile Send private message
  • Joined: 19 Dec 2005
  • Posts: 34
  • Location: United Kingdom
Reply with quote
Post Posted: Sat Dec 31, 2005 11:25 am
asynchronous wrote
This is good work, really, you've definitely got the tech know-how


Thank you.

asynchronous wrote
but it's been done before: most if not all of it is documented in dev documents section, or in previous forum posts (searchable apparently). There are forum extracts on the operation of ports 3E, 3F and how they function in relation to the joypad ports.


To an extent yes it has been done before. I have searched the forum quite extensively as the search facilities are very good. However, many of the articles are written from a purely software perspective. Maxim's article on the cartridge pinouts is exceptionaly good. As are the threads on Ports et al.

I find that a comment such as 'setting bit 6 of port 3E to 0 enables the Cart ROM' to be misleading as it leaves room for the assumption that this bit is directly driving the !CE3 line when in fact the signal is gated with !MREQ. i.e. the !CE3 line is not low all the time. From a hardware perspective the two are quite different. I appreciate that from an emulation point of view it is irrelivant.

Furthermore, due to differences in terminolagy e.g. !KILLGA/JyDS there is a certain amount of confusion regarding logic levels, or at least inconsistancy in labelling.

Yes I realise I am repeating a certain amount of work here but I feel it makes the document easier to read when it is all in one place rather than having to keep jumping across different threads and switching between documents. I apologise if this is a problem.

And yes I am aware that the ROMs used in the BIOS and cartridges are not simple EPROMS but contain mapping logic too but thanks for pointing it out anyway as it may not have been obvious to other readers.

If this thread is too hardware oriented and of no interest to forum members then we could just let it die and I'll go back to lurking.

asynchronous wrote
I had a chance to have a look at the clock signals and pin 41 is the VDP clock at 10.64MHz (double the 'pixel clock').


Thank you, as I figured out after reviewing the TI VDP datasheet this is the VDP dot-clock.

asynchronous wrote
Pin 42 is actually the CPU clock and runs at 3.55MHz (osc/15).


Now we are getting somewhere interesting. Are you using a PAL or NTSC model here? Which model and PCB revision are you using? What is the crystal frequency?

Pin 42 runs at 4.43MHz on my PAL system which is OSC/12. The master oscillator has the frequency written on the can (53.2034MHz).

Pin 42 is fed, via capacitor C52 to the CXA1145P video encoder. According to the datasheet the CXA1145P requires 4.434MHz for PAL and 3.579MHz for NTSC. I have physically traced the circuit across the board, it goes nowhere near the CPU.

The CPU clock is generated by the VDP/PSG ASIC (315-5246) on my PAL system after further dividing the VDP dot clock by 3. I have confirmed pin 33 of the VDP/PSG ASIC is directly connected to the Z80 CPU clock (pin 6) using a multimeter.

asynchronous wrote
Pin 44 might be just an XTAL input that is used with a crystal and not with a xtal can. I can't tell because my oscilloscope can't 'see' a 53MHz signal.


I don't have a scope but have been using a frequency counter. I can't register anything on this pin either.

asynchronous wrote
The grounds might just be dedicated grounds for the XTAL, logic, and the like.


Then where does the general purpose input bit (CONT/CONT1 from cart slot pin 34) go then? I am told that this ASIC is used in Mk1 console too.

Happy New Year
Regards
Marty
  View user's profile Send private message
  • Joined: 14 Aug 2000
  • Posts: 800
  • Location: Adelaide, Australia
Reply with quote
315-5237 Technical (Long)
Post Posted: Sun Jan 01, 2006 7:53 am
I think the number of views of the thread indicate the interest in a topic. Either way, I'm interested in hardware news. I think even the pure software gurus (Maxim) are taking more interest in hardware nitty-gritty.

You're right about missing details, like the slot CE signal being asserted over the entire address range, but this has also been discussed in forums, particularly in people designing dev carts. I really have to get all my info documented electronically, but you know, time and all...

You have a frequency counter. Nice. Wish I had one of those.

You're right about the IC4 connections, I justed checked my hardware docs. IC4 pin 42 goes to the RGB converter through some RC networks, pin 41 goes to the VDP, and the CPU clock is generated by IC5. The PAL SMS CPU runs at 3.55MHz, the NTSC at 3.58MHz.

All my SMS are PAL versions.

Now onto the CONT1 line:

The later SMS 1 I have with the 315-5237 IC (and the 315-5246 PSG/VDP) does not have CONT1 connected to IC4. Pin 34 is interconnected between the cart, card and expansion slots though, but not to IC4.

The SMS model is a 3005-03-B with serial number 40G18909, but of more interest is the dates: most of the IC are dated mid 1989 and the PCB is stamped 20 FEB 1990.

The earlier SMS 1 I have (Model number 3010-03) with the 315-5216 IO Chip and the 315-5124 PSG/VDP where CONT1 is connected to pin 42 of IC4 is dated mid 1986. It could be that CONT1 was carried over to the initial design of the SMS from its predecessor and then after a year or two dropped because no hardware was going to use it.

asynchronous.
  View user's profile Send private message
  • Joined: 14 Aug 2000
  • Posts: 800
  • Location: Adelaide, Australia
Reply with quote
CONT1 Line and Port DD bit 5
Post Posted: Sun Jan 01, 2006 4:06 pm
OK, I've FINALLY managed to run my test programs on my early SMS and verify that,

Bit 5 of Port 0xDD shows the status of the CONT1 (pin 34 of the cart slot).

This bit is by default '1' (explains why this is always set to 1 on later consoles). Pulling the CONT1 signal LOW changes this bit to '0'.

The bit in port 0xDD and the CONT1 line do not seem to be effected by port 0x3F or the mystery bits in port 0x3E.

This information is purely academic though. It means nothing to emulators writers and it's obsolete for hardware developers because this input has been removed on all but the initial version of the SMS. But hey, it's a new piece of information to add to all the docs.

I'm almost willing to bet 20 Euro that Bock already knew this.

asynchronous.
  View user's profile Send private message
  • Site Admin
  • Joined: 08 Jul 2001
  • Posts: 8855
  • Location: Paris, France
Reply with quote
Re: CONT1 Line and Port DD bit 5
Post Posted: Mon Jan 02, 2006 10:13 am
asynchronous wrote
I'm almost willing to bet 20 Euro that Bock already knew this.

Look at the insanely hacked up Meka sources and you'll have no problems understanding that you guys knows generally more than I do.
  View user's profile Send private message Visit poster's website
  • Joined: 19 Dec 2005
  • Posts: 34
  • Location: United Kingdom
Reply with quote
Re: CONT1 Line and Port DD bit 5
Post Posted: Thu Jan 05, 2006 7:09 pm
asynchronous wrote
OK, I've FINALLY managed to run my test programs on my early SMS and verify that, Bit 5 of Port 0xDD shows the status of the CONT1 (pin 34 of the cart slot).


Thanks for that asynchronous. I guess that's why the official Mk.3 Docs show it as don't care. I had hoped that the hardware would still be there, but unused, for hardware hacking purposes as is the case with the reset button circuit (port $DD bit 4, ASIC pin 33).

I too have done some further hardware testing and can confirm that the JYDS pin (315-5237 pin 1, Cart slot pin 43) is asserted high. That is put a logic 1 (Vcc) on it to disable the joystick hardware when you want your own hardware to respond. I would recommend that we refer to this pin as
JYDS
in future since
!KILLGA
implies active low.

Just a point to note. So far I have been unable to find any pull down on JYDS. Which is odd since floating lines are generally read as logic 1. Maybe there is an internal pull down or a capacitor I've missed somewhere? I will have to trace the tracks on the pcb again.

For the sake of completeness the !JYRD line is asserted, taken low, when both A6 and A7 are high and !IORQ is low. The !RD, !WR and A0 signals play no part in the generation of !JYRD. Again, a bad term used for this line as it doesn't care if it's a read or a write. !JYSEL would have been a better term. Note that !JYRD is not connected to the 315-5237. It is for external devices only. The 315-5237 contains it's own logic for reading the joystick ports.

Regards
Marty
  View user's profile Send private message
  • Joined: 14 Aug 2000
  • Posts: 800
  • Location: Adelaide, Australia
Reply with quote
315-5237 Technical (Long)
Post Posted: Fri Jan 06, 2006 1:36 pm
Yes you're quite right; !KBSEL or "JYRD" as you've called it is just a function of A6, A7 and IORQ and simply indicates an IO (read or write) access to the IO Expansion region where the joypad ports are mapped.

And you're right about it being generated by the PSG/VDP

The other signals such as CSRAM, EXM1 and EXM2, which are all functions of MREQ and A14 and A15 only, and are generated by the VDP chip also.

See. I told you to think 'simple' ;o)

asynchronous.
  View user's profile Send private message
Reply to topic



Back to the top of this page

Back to SMS Power!