Nintendo Super System (NSS) (Arcade Cabinet)

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
DogP
Posts: 22
Joined: Wed Oct 17, 2012 7:41 pm

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by DogP » Tue Oct 23, 2012 1:32 am

nocash wrote:Many-many-many thanks for the PROM dumps and confirming CounterOut and Pin-outs!!!
No prob... glad you were able to get it figured out!
nocash wrote:Looking at the OSD SPI-bus might be good thing to start with. I've tried to program it same as in original BIOS, but maybe I missed the chipselect or something like that.
I didn't decode the bits, but all three SPI pins show activity on the logic probe at boot, so I think your code is running. I can hook up the logic analyzer tomorrow and check the data you're sending, if you don't find the problem before then.

DogP

nocash
Posts: 1086
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by nocash » Tue Oct 23, 2012 12:20 pm

I didn't decode the bits, but all three SPI pins show activity on the logic probe at boot, so I think your code is running. I can hook up the logic analyzer tomorrow and check the data you're sending, if you don't find the problem before then.
Good to know that there is some activity. Logic analyzer test would be neat - maybe it's revealing some obvious bug like wrong chipselect.

The OSD control register settings seem to match up with the OSD datasheet, and they are taken from the NSS BIOS anyways, so they should be working. Internal Clock is on, so it should work even if SNES PPU is disabled. The OSC1,OSC2 stuff is stopped - looks a bit suspect, but the NSS BIOS is always doing that, too.

One possible problem might be that the program is accessing the OSD chip too soon after reset. The datasheet is mentioning 'something' about 1ms on last page (not quite clear what that means, and how it fits to reset signals that might be generated by the NSS mainboard). Anyways, the OSD chip is re-initialized in each test screen - if you push some of the four joypad direction keys then the program should redo the OSD init far away from the reset signal.

There should be also some new activity visible on the OSD SPI bus when pushing joypad DPAD buttons, that might also help to see if the Z80 is running or crashed.

---

Here are working PROM dumps for all 12 games: http://nocash.emubase.de/nss-keys.zip - the 5 new keys (with zeroes in first bit) will be working in next no$sns update. Your two new dumps worked find, and for the remaining three games I already guessed the first 8 bytes from INST ROM, and the 9th is usually containing some checksum, so I could calculate the missing value, which worked, too - except for Contra 3, that's using a "wrong" checksum in 9th byte - but I got it deciphered with the brute-force program.

NB. Contra 3 is somewhat less than an experimental pre-prototype game, the INST ROM is almost empty, and even the main menu title string just says "New Game 1". There isn't anything contra-specific in INST ROM, and I think also nothing NSS-specific in the PRG ROM.

With the dumped font & the datasheet details about things like character sizes and the odd scrolling/wrapping feature, my OSD emulation is now looking much nicer. Many thanks there!

nocash
Posts: 1086
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by nocash » Tue Oct 23, 2012 5:42 pm

Here's the new no$sns version with improved NSS emulation http://nocash.emubase.de/sns.htm (it's currently completely freeware, all versions available with and without donations; I am totally broke so it doesn't matter if I don't get money or not). It's now working with all NSS games via the 12 keys in http://nocash.emubase.de/nss-keys.zip. My homebrew NSS game is also updated, http://nocash.emubase.de/magicflr.htm (with nicer BG graphics, more OSD colors, and lowercase text, and punctuation marks matched to the OSD font). And, my NSS specs in http://nocash.emubase.de/fullsnes.htm are also updated (with info from the OSD datasheet and some other new notes).

DogP
Posts: 22
Joined: Wed Oct 17, 2012 7:41 pm

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by DogP » Wed Oct 24, 2012 3:25 am

nocash wrote:One possible problem might be that the program is accessing the OSD chip too soon after reset. The datasheet is mentioning 'something' about 1ms on last page (not quite clear what that means, and how it fits to reset signals that might be generated by the NSS mainboard). Anyways, the OSD chip is re-initialized in each test screen - if you push some of the four joypad direction keys then the program should redo the OSD init far away from the reset signal.

There should be also some new activity visible on the OSD SPI bus when pushing joypad DPAD buttons, that might also help to see if the Z80 is running or crashed.
I didn't have time to hook up the logic analyzer... I'll do that tomorrow night. But I did do the controller test, and it does cause activity on the SPI pins (Left/Right do a lot, Up/Down do just a short blip), but there's still nothing on the screen. So, the code is running, but apparently something isn't quite right. Hopefully the logic analyzer will give us a clue.
nocash wrote:With the dumped font & the datasheet details about things like character sizes and the odd scrolling/wrapping feature, my OSD emulation is now looking much nicer. Many thanks there!
Cool... glad it helped!

DogP

nocash
Posts: 1086
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by nocash » Wed Oct 24, 2012 7:13 am

it does cause activity on the SPI pins (Left/Right do a lot, Up/Down do just a short blip)
Sounds good (up/down just redraws the cursor, and left/right leaves/enters new pages).
So overall Z80 code and joypad input seem to be okay.

Then the SPI data/clk/select signals are probably wrong. Or there's some Z80 OUT port externally disabling the OSD layer (like externally masking off the RGB signals from P0..P2 pins, or holding the /AC pin in reset state).

nocash
Posts: 1086
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by nocash » Wed Oct 24, 2012 8:40 am

Here's an updated version of the test program - http://nocash.emubase.de/nss-test.zip
It's inserting a new OUT [72h],59h prior to the old OUT [72h],C3h chip-selection.
The NSS BIOS is doing the same thing.
Most of the databits are just cryptic random-garbage, but I think that bit6 is CLK, that might be important to be switched high BEFORE setting chipselect to low (which is probably done via bit4).
If that is fixing the OSD output, then I am having a massive problem with initial CLK levels... it's a bit similar to my PROM problem with CLK occuring upon releasing RESET.

DogP
Posts: 22
Joined: Wed Oct 17, 2012 7:41 pm

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by DogP » Thu Oct 25, 2012 2:36 am

nocash wrote:Here's an updated version of the test program - http://nocash.emubase.de/nss-test.zip
Success! Were there any specific tests that you wanted run on hardware?
DSCF3862.JPG
DSCF3863.JPG
DogP

nocash
Posts: 1086
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by nocash » Fri Oct 26, 2012 3:33 pm

Cool. Which tests?

The OSD REG 3/7 tests are rather outdated (since having the datasheet).
The OSD OFFSET tests might be still interesting (as how I do understand the datasheet, the hori/verti offsets should move the screen in 4pixel/4scanline units, but not absolutely sure if did understood that correct).

The TEST SLOTS test was mainly for seeing PROM Data/CounterOut and Title as hexdumps (on the three screens accordingly). That's no longer needed, too. But the Titles in clean-text (not the hex values) would be interesting, to see which slot maps there. If you plug in three cartridges, their titles should appear, probably in same order as how the slots are numbered. Slot selection is done via a 2bit number (hence 4 slots displayed), the last slot might be empty, garbage, or a mirror to another slot.

Then 3 register dump screens would be interesting, so see initial values, and mirrors, and what is stored in unused bits and so on. For the CURRent port values, bit6 of the first byte should be "blinking" - don't know if there are more such bits showing activity?

SELFTEST is measuring some timings, probably 60Hz vsync or vblank from OSD chip or SNES or so. But, if the values are different as expected (and emulated in no$sns), it might have other timings, not related to 60Hz at all. (Btw. The selftest part is very slow, takes some seconds, sorry).

And finally, the JOYPAD/PANEL/COIN screens would be also interesting - but there you might need the whole cabinet, not just the plain mainboard.
JOYPADs are of course normally going to the SNES, but of the joypad 6 buttons are also wired to the Z80. The 4 direction keys, and Button A, and (maybe, totally guessed:) Button B. And I don't if it's joypad 1 or 2 (or both) wired to the Z80.
Front PANEL should be correctly shown in the test, except, quite possible that I've swapped PageUp and PageDown with each other.
COIN/SERVICE should be also as shown. Would be (mildly) interesting if Coin 1 is the Left or Right slot. And aside from the Service button, the official wiring diagram also mentions a Test button - did you ever see that thing? The BIOS doesn't seem to use it at all. If it does exist, then it might show up in the Unknown Bits hexvalue.

Cu, Martin

DogP
Posts: 22
Joined: Wed Oct 17, 2012 7:41 pm

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by DogP » Tue Oct 30, 2012 3:01 pm

nocash wrote:The OSD OFFSET tests might be still interesting (as how I do understand the datasheet, the hori/verti offsets should move the screen in 4pixel/4scanline units, but not absolutely sure if did understood that correct).
Here are the first 3:
DSCF3864.JPG
DSCF3865.JPG
DSCF3866.JPG
DogP

DogP
Posts: 22
Joined: Wed Oct 17, 2012 7:41 pm

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by DogP » Tue Oct 30, 2012 3:10 pm

nocash wrote:The OSD OFFSET tests might be still interesting (as how I do understand the datasheet, the hori/verti offsets should move the screen in 4pixel/4scanline units, but not absolutely sure if did understood that correct).
And the 4th:
DSCF3867.JPG
nocash wrote:SELFTEST is measuring some timings, probably 60Hz vsync or vblank from OSD chip or SNES or so. But, if the values are different as expected (and emulated in no$sns), it might have other timings, not related to 60Hz at all. (Btw. The selftest part is very slow, takes some seconds, sorry).
DSCF3874.JPG
nocash wrote:And finally, the JOYPAD/PANEL/COIN screens would be also interesting - but there you might need the whole cabinet, not just the plain mainboard.
JOYPADs are of course normally going to the SNES, but of the joypad 6 buttons are also wired to the Z80. The 4 direction keys, and Button A, and (maybe, totally guessed:) Button B. And I don't if it's joypad 1 or 2 (or both) wired to the Z80.
Front PANEL should be correctly shown in the test, except, quite possible that I've swapped PageUp and PageDown with each other.
COIN/SERVICE should be also as shown. Would be (mildly) interesting if Coin 1 is the Left or Right slot. And aside from the Service button, the official wiring diagram also mentions a Test button - did you ever see that thing? The BIOS doesn't seem to use it at all. If it does exist, then it might show up in the Unknown Bits hexvalue.
I'll try it in the actual cab when I can... but yes, I the cab has a test button, but I remember it (seemingly) not do anything. I think it's just there because it's standard for a JAMMA cabinet to have, and these cabs were made by Dynamo (they build a lot of arcade cabinets... and air hockey tables). The test switch doesn't seem to do anything in your test software (I have a test switch on my testbench, and the unknown bits didn't change).
DSCF3875.JPG

DogP
Posts: 22
Joined: Wed Oct 17, 2012 7:41 pm

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by DogP » Tue Oct 30, 2012 3:15 pm

nocash wrote:The TEST SLOTS test was mainly for seeing PROM Data/CounterOut and Title as hexdumps (on the three screens accordingly). That's no longer needed, too. But the Titles in clean-text (not the hex values) would be interesting, to see which slot maps there. If you plug in three cartridges, their titles should appear, probably in same order as how the slots are numbered. Slot selection is done via a 2bit number (hence 4 slots displayed), the last slot might be empty, garbage, or a mirror to another slot.
Yep, they were in order of slot 1, 2, and 3 (Super Mario World was in slot 1).
DSCF3868.JPG
DSCF3869.JPG
DSCF3870.JPG
DogP

DogP
Posts: 22
Joined: Wed Oct 17, 2012 7:41 pm

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by DogP » Tue Oct 30, 2012 3:21 pm

nocash wrote:Then 3 register dump screens would be interesting, so see initial values, and mirrors, and what is stored in unused bits and so on. For the CURRent port values, bit6 of the first byte should be "blinking" - don't know if there are more such bits showing activity?
The only activity was on bit 6 of the first byte of some of the rows (a couple of the rows would blink between C0 and 80).
DSCF3871.JPG
DSCF3872.JPG
DSCF3873.JPG
DogP

DogP
Posts: 22
Joined: Wed Oct 17, 2012 7:41 pm

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by DogP » Wed Oct 31, 2012 12:20 am

Just a misc update... I shortened the cables to my SNES cart adapter by about 4", and it's much better... but still not 100%. Using my original Mario Kart cartridge, there's only a few lines across the screen. On my flash cart, the screen looks perfect, but the game still glitches when you drive.

So, I guess I should just finish laying out the PCB and get it made... then see where I'm at.

DogP

nocash
Posts: 1086
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by nocash » Sun Dec 02, 2012 10:20 am

Cool, many thanks for running the tests! And sorry about the late reply!
Seeing the I/O ports & mirrors is nice.
The VBL test does apparently show VSYNC timings (not VBLANK), and with the bit being inverse of what I had guessed.
The OFF test disables NMIs (and does show wait-for-NMI timeouts as expected).
The NMI test was meant to enable NMIs (but does also run into timeouts, damn)

Now I am bit clueless how to enable NMIs... either it requires some strange combination of Port 00h Bit0 and Bit1... maybe enable AND acknowledge or so... or maybe the NMI source is missing... it might be Vblank or Vsync from OSD chip... or fromSNES PPU... or maybe NMIs are triggered by SNES controller reads or whatever.

Btw. if somebody wants to modify the Z80 source code of the test proggy: You could assemble that Z80-dialect with the Utility/AssembleFile function from my no$zx emulator.

nocash
Posts: 1086
Joined: Fri Feb 24, 2012 12:09 pm
Contact:

Re: Nintendo Super System (NSS) (Arcade Cabinet)

Post by nocash » Tue Dec 25, 2012 5:13 am

DogP has tested the Game/Demo-mode detection being used in the Magic Floor NSS version (http://nocash.emubase.de/magicflr.htm). I have been afraid that it might fail on real hardware.... but, it worked perfectly!
The detection works by reading the 17th bit from the serial joypad data, ie. same as the "joypad-connected" detection on normal SNES consoles. On the NSS the bit means "joypad enabled". For a nice arcade-feeling one can use that detection to "autostart when money inserted".
A pity that the original NSS games didn't support that feature, but at least they didn't show "no joypad connected error" messages in demo mode - which would have looked really bad.

Post Reply