Jump to content
IGNORED

Test if a skunkboard is present


toarnold

Recommended Posts

Hello friends,

 

I have two questions:

  1. How I can test if a skunk board is present? Is there any "magic" word or version number in the skunk bios range ($800000 to $801FFF) I can check?
  2. How can I test if jcp is running in console mode? If I call skunkRESET this function seems never to return if I forget the jcp parameter -c. No timeout occurs.

Thanks and greetings

toarnold

  • Like 1
Link to comment
Share on other sites

It's supposed to timeout after 200,000 cycles and flag the console as down... but I haven't run this code in years. Look at the 'getBothBuffers' function, that's where you're hung up, most likely.

 

As for testing presence, we didn't put any magic strings in the BIOS. There is a set of 4 32-bit values at 0x00800800:

$00800800 - version number (MMMMmmmm) - M -major, m -minor

$00800804 - vector to flasher function address (should be less than $4000)

$00800808 - serial number - shipped boards were a BCD value less than 10,000, but all bets are probably off ;)

$0080080C - $BEEFDEAD - value used by the initial programming helper code to find the right spot in the binary. This should be present on boards that haven't been extensively modified.

 

The rest of the BIOS code shifted around from version to version. You could search the BIOS area for the Battlesphere strings, cause that'd be hilarious. ;) (Look at STARTUP.S around the label 'sigs', but again, they will shift around to different addresses on different BIOS versions).

 

To be extremely picky, the best way to detect the Skunkboard hardware is to check for the MCU on the HPI bus (and conversely, the HPI bus itself). If you set HPI write mode and write data to one of the packet buffers (or other unused RAM), you can switch to HPI read mode and read it back. Write a couple of values to different HPI addresses and you can verify you aren't just talking to cartridge RAM. Again, look in the Skunkboard release package for notes on how to do that -- but you probably don't need to go to that level.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...

It's supposed to timeout after 200,000 cycles and flag the console as down... but I haven't run this code in years. Look at the 'getBothBuffers' function, that's where you're hung up, most likely.

I think I got it.

There is a WORD/DWORD missmatch in the wait-loops:

move.l #timeout,d0
...
subq #1,d0
tst.l d0
bne .wait

subq #1,d0 isn't qualified with a register size, so only WORD size is taken. Substitute with subq.l #1,d0 did the trick!

I found this pattern four times.

Here is my modified skunk.s. Hopefully you can approve my changes.

 

Greetings,

toarnold

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

Nice catch! I've updated the distributions on Harmlesslion with your patch. Thank you :)

 

Hi,

 

Just wondering if there was any chance of W10a drivers that don't need Unsigned activated each boot? (Yes, I know its not the Skunkboard drivers, but the USB handler) - is there a workable alternative?

  • Like 1
Link to comment
Share on other sites

 

Hi,

 

Just wondering if there was any chance of W10a drivers that don't need Unsigned activated each boot? (Yes, I know its not the Skunkboard drivers, but the USB handler) - is there a workable alternative?

 

M$ has been slowly getting more draconian about this over time. They want hardware manufacturers to pony up "testing" and "certification" tributes.

 

At least with Windows 7 you could use tools like this:

http://www.ngohq.com/?page=dseo

Link to comment
Share on other sites

Just wondering if there was any chance of W10a drivers that don't need Unsigned activated each boot? (Yes, I know its not the Skunkboard drivers, but the USB handler) - is there a workable alternative?

It's all down to libUSB, that's all they are... official home page (after some hunting) is here: http://libusb.info/

 

It's not clear reading the page whether they have signed drivers for Win10 (they did for 7 last time I tried it). However, several pages, including the libUSB page, recommend a tool called Zadig for handling the signing. http://zadig.akeo.ie/- it appears that it can produced a signed system for you.

 

The driver that says "Skunkboard" in the old distribution is 100% identical to the "libUSB Device" driver. They simply offered a little tool that let you specialize the driver information. So you can safely use a plain old libUSB driver with no changes, if it installs (and if the API hasn't changed, but if it did, probably won't have changed by much).

 

I can't give it a try here since I don't have Win10 installed right now... just Win7.

Link to comment
Share on other sites

  • 1 month later...

As CyranoJ has not update this thread on if he was successful or not and I wanted to get my Skunkboard going again I have just tried using ZADIG and the "libusb-win32 (v1.2.6.0)" option as the driver for the Skunkboards Cypress OGT device allowed me to flash the Rebooteroids and Thea Realm Fighter ROMs and Gemrace.COF to my Skunkboard using the command line version of JCP.

Originally I tried the ZADIGs WinUSB option as I was not sure it that was just the default or its recommended option however that did not seem to work, I do not know if any of the other options ZADIG gives you will also work but this one works for me on a up to date version of Win10, 64 bit.

Edited by Stephen Moss
  • Like 3
Link to comment
Share on other sites

Good news, Stephen!

 

Could you post the updated driver package ?

 

I am not entirely sure what you mean by that, if you go to the Zadig website you can download Zadig and use it to install the driver, they also have a link there to a sourceforge download for libusb-win23 files. In Device manager I looked at the driver details for the Skunboard and it appeared to list 4 different files all in different directories so if you were hoping for a single driver file it may not be that simple.

Edited by Stephen Moss
Link to comment
Share on other sites

  • 2 months later...

I'm happy to report that I got the Skunk working under Windows 10 using that Zadig program and installing drivers. Finally it all works again as intended. Thanks for the hint.

 

Maybe posting a guide would be good if you have time? :D

Link to comment
Share on other sites

 

Maybe posting a guide would be good if you have time? :D

Sure :-), i mean it's actually all in Tursis and Stephen's posts.

 

- Go to the Zadiq Website and download Zadiq

- Run the program

- Select the drivers you need, in this case probably libsub-win32 as Tursi said, but as Stephen mentioned might be a different one of the four for different folks.

- Push install/reinstall button.

- Restart Computer (didn't work directly without restarting)

- Ready to go.

 

I attached a little graphic of the programm window. It's basically two button presses.

(For the record, I don't actually know what I have been doing, just following the hints and it worked, so please don't sue me, if doesn't for you. :D)

post-1084-0-02504000-1491784521_thumb.jpeg

  • Like 6
  • Thanks 1
Link to comment
Share on other sites

  • 10 months later...

Finally! I've kept a 10-year old XP laptop hanging around strictly for using with my Skunk 2 board, as I could never get it to talk with my newer Win 10 laptop.

About a year ago, I spent about a few hours working on getting it working, gave up on it, and then saw this thread. I was too frustrated with trying at the time, so I just pushed it aside and forgot about it.

 

I just took another attempt now with the ZADIG utility mentioned above - and it worked first try!

post-8320-0-88870600-1519490939_thumb.jpg

  • Like 7
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...