It is currently Sun Oct 22, 2017 9:25 pm

All times are UTC - 7 hours



Forum rules


Related:



Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
PostPosted: Tue Oct 23, 2012 1:32 am 
Offline

Joined: Wed Oct 17, 2012 7:41 pm
Posts: 22
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


Top
 Profile  
 
PostPosted: Tue Oct 23, 2012 12:20 pm 
Offline

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 530
Quote:
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!


Top
 Profile  
 
PostPosted: Tue Oct 23, 2012 5:42 pm 
Offline

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 530
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).


Top
 Profile  
 
PostPosted: Wed Oct 24, 2012 3:25 am 
Offline

Joined: Wed Oct 17, 2012 7:41 pm
Posts: 22
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


Top
 Profile  
 
PostPosted: Wed Oct 24, 2012 7:13 am 
Offline

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 530
Quote:
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).


Top
 Profile  
 
PostPosted: Wed Oct 24, 2012 8:40 am 
Offline

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 530
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.


Top
 Profile  
 
PostPosted: Thu Oct 25, 2012 2:36 am 
Offline

Joined: Wed Oct 17, 2012 7:41 pm
Posts: 22
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?

Attachment:
DSCF3862.JPG
DSCF3862.JPG [ 75.02 KiB | Viewed 2559 times ]

Attachment:
DSCF3863.JPG
DSCF3863.JPG [ 117.26 KiB | Viewed 2559 times ]


DogP


Top
 Profile  
 
PostPosted: Fri Oct 26, 2012 3:33 pm 
Offline

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 530
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


Top
 Profile  
 
PostPosted: Tue Oct 30, 2012 3:01 pm 
Offline

Joined: Wed Oct 17, 2012 7:41 pm
Posts: 22
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:
Attachment:
DSCF3864.JPG
DSCF3864.JPG [ 77.41 KiB | Viewed 2433 times ]

Attachment:
DSCF3865.JPG
DSCF3865.JPG [ 63.35 KiB | Viewed 2433 times ]

Attachment:
DSCF3866.JPG
DSCF3866.JPG [ 58.62 KiB | Viewed 2433 times ]


DogP


Top
 Profile  
 
PostPosted: Tue Oct 30, 2012 3:10 pm 
Offline

Joined: Wed Oct 17, 2012 7:41 pm
Posts: 22
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:
Attachment:
DSCF3867.JPG
DSCF3867.JPG [ 60.05 KiB | Viewed 2433 times ]


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

Attachment:
DSCF3874.JPG
DSCF3874.JPG [ 72.24 KiB | Viewed 2433 times ]


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).
Attachment:
DSCF3875.JPG
DSCF3875.JPG [ 54.1 KiB | Viewed 2433 times ]


Top
 Profile  
 
PostPosted: Tue Oct 30, 2012 3:15 pm 
Offline

Joined: Wed Oct 17, 2012 7:41 pm
Posts: 22
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).
Attachment:
DSCF3868.JPG
DSCF3868.JPG [ 99.75 KiB | Viewed 2431 times ]

Attachment:
DSCF3869.JPG
DSCF3869.JPG [ 84.63 KiB | Viewed 2431 times ]

Attachment:
DSCF3870.JPG
DSCF3870.JPG [ 99.29 KiB | Viewed 2431 times ]


DogP


Top
 Profile  
 
PostPosted: Tue Oct 30, 2012 3:21 pm 
Offline

Joined: Wed Oct 17, 2012 7:41 pm
Posts: 22
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).

Attachment:
DSCF3871.JPG
DSCF3871.JPG [ 81.23 KiB | Viewed 2431 times ]

Attachment:
DSCF3872.JPG
DSCF3872.JPG [ 82.64 KiB | Viewed 2431 times ]

Attachment:
DSCF3873.JPG
DSCF3873.JPG [ 83.87 KiB | Viewed 2431 times ]


DogP


Top
 Profile  
 
PostPosted: Wed Oct 31, 2012 12:20 am 
Offline

Joined: Wed Oct 17, 2012 7:41 pm
Posts: 22
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


Top
 Profile  
 
PostPosted: Sun Dec 02, 2012 10:20 am 
Offline

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 530
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.


Top
 Profile  
 
PostPosted: Tue Dec 25, 2012 5:13 am 
Offline

Joined: Fri Feb 24, 2012 12:09 pm
Posts: 530
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: AWJ and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group