What's new

rtw

Champion
Joined
Sep 28, 2015
Messages
1,853
Reaction score
2,295
Location
Norway
Device: PIC16F628A

The archive contains 2 files:

ABC_BIN_0000000000000000.bin

Suitable for CF and standard GD-ROM, DES KEY = 0000000000000000, Loader name: ABC.BIN

ABC_BIN_0000000000000000_NET.bin

Suitable for Net-Booting, DES KEY = 0000000000000000

archive: View attachment naomi_pic.zip

The following programmer settings should be used.

dimm_pic_16f628a.png



Oscillator: HS
WDTE (watchdog) disabled.
PWRTE (power up timer) enabled.
Code Protect: All protected
MCLRE should be set to internal also called "disabled"
BOREN/BODEN (brown-out reset) disabled.
LVP (low-voltage programming) enabled.
CPD should be 0, meaning that data code protection is on

This should give a config word of: 0x1e82

Huge thanks to @zeruel85 for verifying these settings :thumbsup:

Verified Compatibility:

CF and standard GD-ROM

NAOMI1, NAOMI2, Chihiro, Triforce

Net-Boot

NAOMI1, NAOMI2, Chihiro, Triforce

Note:

The Net-Boot version: ABC_BIN_0000000000000000_NET.bin works with Chihiro and Triforce in both CF,GD-ROM and Net-Boot mode.

It is only the NAOMI system which requires: ABC_BIN_0000000000000000.bin for CF and GD-ROM.
 
Last edited:
29qlfn4.png


just to make sure it goes with your settings, I don't have the pic yet once it gets here I'll test it
 
Hello,

I have a question regarding the choose of the oscillator selection.
I read PIC16F628A datasheet and it appears that HS mode is only for 8 to 16 Mhz resonator.
However, lookin' at my NetDimm, I clearly see a 4 Mhz oscillator, with the clock line going into pin 16 (CLKIN) of the PIC16F628A, as expected.

So the question is really simple: does the external oscillator (OSC2 on the silkscreen) work both in rising edge and falling edge, giving us a 2x 4 MHz clock = 8 MHz? Or maybe it would be better to select XT mode, thus a standard 4 MHz freq?

Thanks for your attention guys. :)

EDIT: moreover, if I correctly understand what this means, isn't it better to use the INTOSC?
"The PIC16F627A/628A/648A oscillator design requires the use of a parallel cut crystal. Use of a series cut crystal may give a frequency out of the crystal manufacturers specifications." (PIC16F628A page 99).
 

Attachments

  • OSC2.jpg
    OSC2.jpg
    141.2 KB · Views: 182
Last edited:
@zeruel85 you raise an interesting point.

Can you share some pictures of clock and PIC circuitry ?

I am curious to what kind of circuit is surrounding the oscillator and if we can determine which setting to use based on this.
 
@zeruel85 you raise an interesting point.

Can you share some pictures of clock and PIC circuitry ?

I am curious to what kind of circuit is surrounding the oscillator and if we can determine which setting to use based on this.
The clock line has only a 33 Ohm series resistor (R71), then it goes straight to pin 16 of the PIC16F628A.
There's also a decoupling cap (PC35S on silkscreen, maybe a classic 0.1 uF) between VCC and GND of the oscillator, but nothing more than that.
Pin 15 (CLKOUT) of the PIC is unconnected.
The OSC2 element is a 4 MHz active oscillator.
 

Attachments

  • bottom.jpg
    bottom.jpg
    203.4 KB · Views: 128
  • top.jpg
    top.jpg
    196.7 KB · Views: 133
Thank you for the pictures, what about PIN 15 on the PIC is that connected to anything ?
 
@zeruel85 thanks for taking the time to check and take photos!

EC is the correct mode for the this type of oscillator (FOSC[2:0] = 011)
 
Am I mistaken in thinking that ABC_BIN_0000000000000000_NET.bin will allow both netbooting and CF card use?

I'm sure I've done this in the past by moving the jumpers on the DIMM board from network mode to GD-ROM mode. It was then a case of booting an unencrypted game with a bootstrap/1stread file named ABC.BIN from a CF card, using the very same PIC.

A comment to the contrary in the other thread is making me doubt myself, however.
 
Am I mistaken in thinking that ABC_BIN_0000000000000000_NET.bin will allow both netbooting and CF card use?
Yes you are, the NET and Normal have different answers to the challenge response.
 
This oscillator discussion got me thinking, what would SEGA have done ?

The original device used is a: PIC16C621A

I asked @MetalliC if he could load the official SEGA hex file into the ELNEC control software with the device set to 16C621A to determine if there were any register settings in the file.

Here is the result:

config.png
 
This oscillator discussion got me thinking, what would SEGA have done ?

The original device used is a: PIC16C621A

I asked @MetalliC if he could load the official SEGA hex file into the ELNEC control software with the device set to 16C621A to determine if there were any register settings in the file.

Here is the result:

config.png
Wow, it's a big mess all around, lol! :D

It seems correct using HS mode then?

And what about ID0-ID3? They are 0xFFFF instead 0x0000.
 
@zeruel85

It would seem that on NAOMI HS Oscillator is the way to go, the jury is still out on Chihiro and Triforce, if anyone has hardware to contribute we can analyze that a bit closer!

Don't worry about the ID bits they are not used in the code.
 
@zeruel85

It would seem that on NAOMI HS Oscillator is the way to go, the jury is still out on Chihiro and Triforce, if anyone has hardware to contribute we can analyze that a bit closer!

Don't worry about the ID bits they are not used in the code.
Gotcha.

I reflashed the PIC with your code and proper settings (HS mode). Now I have only to find the time to test it. ;)
 
Technically speaking XT/HS should work regardless (the difference is current gain to drive an oscillator circuit on CLKOUT, but the dimm is using a clock generator). The 628 has the EC (external clock) option, which the 621 does not. EC will enable CLKIN pin, and disable the driver on CLKOUT.

If programming PIC16F628A, use EC (EXTCLK) as that is the best option for the application
 
Technically speaking XT/HS should work regardless (the difference is current gain to drive an oscillator circuit on CLKOUT, but the dimm is using a clock generator). The 628 has the EC (external clock) option, which the 621 does not. EC will enable CLKIN pin, and disable the driver on CLKOUT.

If programming PIC16F628A, use EC (EXTCLK) as that is the best option for the application
I agree that on the 627/628 it is more logical to use EC but please test this people!

Maybe EC will be better on Chihiro/Triforce as well but I would like to see hardware pictures first!
 
Back
Top