PSNee further development

General information to do with the PlayStation 1 Hardware. Including modchips, pinouts, rare or obscure development equipment, etc.
Goustoulos
What is PSXDEV?
What is PSXDEV?
Posts: 2
Joined: Sep 16, 2017

Post by Goustoulos » September 17th, 2017, 7:48 am

hey rama! thanks for the reply!
i would love to, but i dont have a good enough camera, so its just gonna be a blurry mess. the soldering looks fine to me tho.
i removed all of the wires, and reverted my ps1 to stock, and it still does the same thing. it used to work fine before, so i guess i damaged something during the installation.
i ll give psnee another go when i get my hands on an other ps1!
thanks once again!

rama3
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 510
Joined: Apr 16, 2017

Post by rama3 » September 17th, 2017, 11:49 am

Yeah, that sounds like a physical problem with the CD drive.

User avatar
Mek
Curious PSXDEV User
Curious PSXDEV User
Posts: 11
Joined: Sep 19, 2017
I am a: SW engineer
PlayStation Model: PS1
Location: Slovakia
Contact:

Post by Mek » September 19th, 2017, 7:20 am

Hello,
I have an old PS 1 here. It's a SCPH-1002 PAL version. Board is PU-8. I was looking at the pictures of boards that are in the zip file on github. There are 2 pictures of PU-8 board but mine looks different! :o
This forum has ridiculous limitations for attachment pictures. When I downsized them to 1024px, they looked bad. So I have uploaded the pictures of the board in full resolution here:
https://image.ibb.co/iboyJk/PU8_1.jpg
https://image.ibb.co/bWJ4r5/PU8_2.jpg
Can someone please mark the spots where to attach wires to modchip this beast?
On a side note - I don't have any arduino board at hand, but I have some attiny85 and atmega8/88/328 chips here. I'd like to use one of these chips. Which signal goes into which pin? I found the "pin assignment" section in the readme on github but in the column for "attiny" there pins are numbered from 0...?

User avatar
Mek
Curious PSXDEV User
Curious PSXDEV User
Posts: 11
Joined: Sep 19, 2017
I am a: SW engineer
PlayStation Model: PS1
Location: Slovakia
Contact:

Post by Mek » September 20th, 2017, 5:21 am

I hoped someone would answer. But since nobody did, I digged into it further. I found out that the pins numbered from zero do not mean pin number on the chip, but PBx port. Like this:

Code: Select all

PB port / pin / meaning
PB0 5 SQCK
PB1 6 SUBQ
PB2 7 DATA
PB4 3 GATE_WFCK
- 8 Vcc
- 4 GND
I downloaded arduino ide, compiled the latest .ino file, exported a .hex file and flashed it into the attiny85v using atmel studio and my avrdragon. Of course, I did not forget to unset the CKDIV8 fuse so that the clock is not internally divided by 8.
When connecting the chip to the board, I used image PU-8(a).jpg from the zip file on github, as a reference. My connections look like this: https://image.ibb.co/m5eqYk/PU8_modded.jpg
I placed the attiny into a socket and before seating it in, I measured input voltage - I was getting 3.5V on Vcc and GND as required. Fine, so I turned the PS1 off and seated the attiny in. I placed a burned CD-R inside and started the PS1. To my surprise, it did not work :? it still displays "insert disc", as it displayed before, without the modchip.
InsertDisc.jpg
I don't have any original PS1 disc, only this burned one. I'm not even sure if I burned it correctly, it was only an .iso file that could not be mounted or read by 7-zip, but burned successfully. I also used the "verify" option of imgburn (that's the software I used) and it threw out many read errors right from the beginning, when it compared the burned CD against the .iso. I don't know if that is expected. The folders and files, however, can be viewed directly from the CD after burning. What should I try?
You do not have the required permissions to view the files attached to this post.

rama3
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 510
Joined: Apr 16, 2017

Post by rama3 » September 20th, 2017, 8:40 pm

Your AtTiny pin assignments look fine. Soldering is to the correct spots.
At this point, I recommend you attach a Serial to USB bridge to the debug pin and recompile/flash with PSNEEDEBUG enabled. (The debug pin is TX, no RX needed. Connect at 115200 baud.)

It will tell you what's going on.

The wires look long and these AtTiny aren't too precise. Maybe some signals are too distorted.

likeabaus
Extreme PSXDEV User
Extreme PSXDEV User
Posts: 133
Joined: Jul 27, 2016

Post by likeabaus » September 21st, 2017, 5:07 am

You should be reading 0 volts at GND (or close to it). How exactly did you measure it? I'm not sure I understand. Did you simply take the red lead from your meter and touch it to VCC and then the black to GND? If you'ryou're reading 3.5 volts that way your fine but if you put the red lead on GND and say used the metal chassis in the console for the black lead and you'ryou're getting 3.5 volts then there's either something wrong with your install or the IC is dead

User avatar
Mek
Curious PSXDEV User
Curious PSXDEV User
Posts: 11
Joined: Sep 19, 2017
I am a: SW engineer
PlayStation Model: PS1
Location: Slovakia
Contact:

Post by Mek » September 21st, 2017, 7:54 am

I measured the 3.5V by placing the DMM leads on Vcc and GND pins of the attiny.
Thanks for approving my pinout and soldering places :D
Meantime, I found out that the CD I burned yesterday, was full of errors so I bought a cake of new CD-Rs today (made by sony, incidentally :D ) to test with. I made another copy of the game and this time verification after burning was successful so now I have a supposedly good copy.
However, the CD drive in the PS1 is acting up more and more. Yesterday I was able to play audio CDs almost without stuttering when I placed it upside-down, today it is having problems even in this position with audio CDs. The game CD is not read successfully. Most of the time, it spins up, tries to load some data, and then gives up after few seconds (BIOS menu with card management and audio cd player is still shown). A few times I also saw the "insert disc" screen after it gave up reading. And a few times it was spinning the disc and reading and reading and reading... for a few minutes, and only then gave up, while only the BIOS screen was shown. When not in upside-down position, but in normal position, it only makes ticking sounds and doesn't read even an audio CD.
As you suggested, I also recompiled the hex file with debug option enabled. I have two USB-to-serial cables here and used Putty to listen on the COM port. I connected attiny pin 2 to serial RXD and attiny GND to serial GND.
1) a CA-42 cable for nokia phones which I dismantled and used as a serial cable. It identifies itself as a Prolific cable but drivers installed by Windows automatically were somehow not working (Code 10) - I solved this by downloading some "code 10 fix" for prolific cables, which apparently installed some older driver and I got rid of the Code 10 error. I didn't receive any characters, nothing.
2) the second cable was identified as "USB-SERIAL CH340" and it is a cheap china-made cable with a male DB9 at the other end. I identified RXD as pin 2 and GND as pin 5 and connected these to the attiny. This time also I never got a single character.
I hope I had the other serial settings in putty correct - data bits 8, stop bits 1, parity none, flow control none.
I also tried putting this:

Code: Select all

DEBUG_PRINT("SETUP");
after this line:

Code: Select all

mySerial.begin(115200); // 13,82 bytes in 12ms, max for softwareserial. (expected data: ~13 bytes / 12ms)
just so that _something_ is output via serial right from the start, so I could receive something in PC. But I didn't receive anything, as I wrote...
Anyway, the cables from the board to the attiny are probably 20cm in length because there isn't enough space for the attiny chip inside a socket under the board. And even for debugging purposes, I have to assemble the PS1 again. But maybe I could level out the pins of the attiny, and solder directly on it, but then I couldn't program it anew.
I hope I can at least fix the CD drive. Found some howtos on the net, will try them tomorrow.

rama3
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 510
Joined: Apr 16, 2017

Post by rama3 » September 21st, 2017, 11:08 am

Your putty settings look fine to me. You told it to connect at 115200 baud, right?

But anyway, I assume the chip is already working. It's that drive that needs some maintenence ;)

Unfortunately, what you describe sounds like the common early drive end of life state.
The read head rails are worn down and you'll find that plastic dissolved in the remaining grease.
Repairing this properly is very hard, so I recommend replacing the drive entirely.
PSOne console's have the perfect replacement.

If you want to try repairing, clean the lens, wipe the dried up grease off the rails and apply some new grease (white lithium is best).
50% of these old consoles have spent motors as well.
You'll know it by their sound, once you get something to read:
- A spent spindle motor will be clearly audible in 1x operation and sound like and old car revving up when it goes into 2x mode.
- A spent positioning motor will make loud grinding noises when it moves the read head.

If you have these symptoms, it means that the electronics have it extra hard to get a good focus on the CD.
A tiny amount of WD40 into the venting holes of those motors will help them get another couple of hours out of them.

Hope this helps! :)

User avatar
Mek
Curious PSXDEV User
Curious PSXDEV User
Posts: 11
Joined: Sep 19, 2017
I am a: SW engineer
PlayStation Model: PS1
Location: Slovakia
Contact:

Post by Mek » September 22nd, 2017, 7:15 am

Yes, baud rate of the port was set to 115200.
Today I started with repairing the CD drive. I managed to level it up and it now reads audio CDs without problems, even in upright position. Cool, I thought.
But it's worse with the game CD-R. The first few times, it didn't load the game and ended up with the "insert disc" screen - indicating that the modchip didn't work (or maybe it was still the problem of CD drive).
So I made the wires to the chip as short as possible, and of course I couldn't use a socket anymore. My soldering job can be seen here - I also added a cable from pin 2 (debugtx) and GND out of the PS1 plastic case. After reassembling, I was still getting the "insert disc" screen. Of course, I again received no data at all on the debug serial line.
Then I tried several audio CDs, they played fine. Since then, I got "insert disc" a few times on the game CD-R, but most of the times it stayed on the bios screen, indicating it could not read the disc at all.
I tried connecting a multimeter on the debugtx and gnd, measuring voltage. After starting PS1, I got 2 very short spikes but they were too short for the DMM to display voltage value, I saw it only on a bar indicator which my DMM also has on its display. I tried setting my DMM to "max" mode in which it should only display the max voltage encountered, but I guess the spikes were not long enough for DMM to care (e.g. max was still zero volts).
After still no success, I thought that maybe a level shifter is needed - maybe the debugtx was operating on 3.5V but usb-serial cable expects 5V. I built a quick one such level shifter with CD4049UBE (two inverters in series) but it just won't budge. Still no data at all.
I am ordering a replacement CD drive so that will be one more thing to rule out. Otherwise I don't know why it's still not working. Will report then...

rama3
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 510
Joined: Apr 16, 2017

Post by rama3 » September 22nd, 2017, 10:32 am

Hm, too bad you don't have an actual Arduino. Debug LED and not minding fuses would help now.
Can you measure voltage on the sqck and gate_wfck pins? You should get about 3.3V on gate_wfck and for sqck you'll probably get a few regular blips, since it's a clock pulse in bursts.

The code will regularly print debug information when any disk is being read and when the subcode data makes any sense at all.

Edit:
If you old drive reads audio CD, then the modchip should talk over the debug pin. It doesn't require a PSX game. Any disk is fine.

Code: Select all

// put this in setup() to debug the debug pin :p
for (int x = 0; x < 5000; x++) {
DEBUG_PRINT(x);
delay(5);
}

User avatar
Mek
Curious PSXDEV User
Curious PSXDEV User
Posts: 11
Joined: Sep 19, 2017
I am a: SW engineer
PlayStation Model: PS1
Location: Slovakia
Contact:

Post by Mek » September 23rd, 2017, 4:00 am

I got the debug pin working! :D
The problem was that I used "Arduino Uno" as board when I compiled the .ino file and so the resulting .hex file was not valid for my attiny. I followed a tutorial to set up arduino ide for a standalone attiny and then I was able to compile and export the correct .hex file.
Now I am getting a lot of data when the PS1 is started with game disc:

Code: Select all

m 0
6100A298372300593165827A
6100A298372400593165FCFF
410001983725000002009F7F
41000198372600000200FCFF
410001983727000002009F7F
6100A098372800012000FCFF
6100A0983729000120009F7F
6100A098373000012000FCFF
6100A1983731000100009F7F
6100A198373200010000FCFF
6100A1983733000100009F7F
6100A298373400593165FCFF
6100A2983735005931659F7F
6100A298373600593165FCFF
410001983737000002009F7F
41000198373800000200FCFF
410001983739000002009F7F
6100A098374000012000FCFF
6100A0983741000120009F7F
6100A098374200012000FCFF
6100A1983743000100009F7F
6100A198374400010000FCFF
6100A1983745000100009F7F
6100A298374600593165FCFF
6100A2983747005931659F7F
6100A298374800593165FCFF
410001983749000002009F7F
41000198375000000200FCFF
410001983751000002009F7F
6100A098375200012000FCFF
6100A0983753000120009F7F
6100A098375400012000FCFF
6100A1983755000100009F7F
6100A198375600010000FCFF
6100A1983757000100009F7F
6100A298375800593165FCFF
6100A2983759005931659F7F
6100A298376000593165FCFF
410001983761000002009F7F
41000198376200000200FCFF
410001983763000002009F7F
6100A098376400012000FCFF
6100A0983765000120009F7F
6100A098376600012000FCFF
6100A1983767000100009F7F
6100A198376900010000FCFF
6100A2983770005931659F7F
6100A298377100593165FCFF
6100A2983772005931659F7F
41000198377300000200FCFF
410001983774000002009F7F
41000198380000000200FCFF
6100A0983801000120009F7F
6100A098380200012000FCFF
6100A0983803000120009F7F
6100A198380400010000FCFF
6100A1983805000100009F7F
6100A198380600010000FCFF
6100A2983807005931659F7F
6100A298380800593165FCFF
6100A2983809005931659F7F
41000198381000000200FCFF
410001983811000002009F7F
41000198381200000200FCFF
6100A0983813000120009F7F
6100A098381400012000FCFF
6100A0983815000120009F7F
6100A198381600010000FCFF
6100A1983817000100009F7F
6100A198381800010000FCFF
6100A2983819005931659F7F
6100A298382000593165FCFF
6100A2983821005931659F7F
41000198382200000200FCFF
410001983823000002009F7F
41000198382400000200FCFF
6100A0983825000120009F7F
6100A098382600012000FCFF
6100A0983827000120009F7F
6100A198382800010000FCFF
6100A1983829000100009F7F
6100A198383000010000FCFF
6100A2983831005931659F7F
6100A298383200593165FCFF
6100A2983833005931659F7F
41000198383400000200FCFF
410001983835000002009F7F
41000198383600000200FCFF
6100A0983837000120009F7F
6100A098383800012000FCFF
6100A1983841000100009F7F
6100A198384200010000FCFF
6100A2983843005931659F7F
6100A298384400593165FCFF
6100A2983845005931659F7F
41000198384600000200FCFF
410001983847000002009F7F
41000198384800000200FCFF
6100A0983849000120009F7F
6100A098385000012000FCFF
6100A0983851000120009F7F
6100A198385200010000FCFF
6100A1983853000100009F7F
6100A198385400010000FCFF
6100A2983855005931659F7F
6100A298385600593165FCFF
6100A2983857005931659F7F
41000198385800000200FCFF
410001983860000002009F7F
6100A098386100012000FCFF
6100A0983862000120009F7F
6100A098386300012000FCFF
6100A1983864000100009F7F
6100A198386500010000FCFF
6100A1983866000100009F7F
6100A298386700593165FCFF
6100A2983868005931659F7F
41000198387000000200FCFF
410001983871000002009F7F
41000198387200000200FCFF
6100A0983873000120009F7F
6100A098387400012000FCFF
6100A1983901000100009F7F
6100A198390200010000FCFF
6100A1983903000100009F7F
6100A298390400593165FCFF
6100A2983905005931659F7F
6100A298390600593165FCFF
410001983907000002009F7F
41000198390800000200FCFF
410001983909000002009F7F
6100A098391000012000FCFF
6100A0983911000120009F7F
6100A098391200012000FCFF
6100A1983913000100009F7F
6100A198391400010000FCFF
6100A1983915000100009F7F
6100A298391600593165FCFF
6100A2983917005931659F7F
6100A298391800593165FCFF
410001983920000002009F7F
41000198392100000200FCFF
6100A0983922000120009F7F
6100A098392300012000FCFF
6100A0983924000120009F7F
6100A198392500010000FCFF
6100A1983926000100009F7F
6100A198392700010000FCFF
6100A2983928005931659F7F
6100A298392900593165FCFF
6100A2983930005931659F7F
41000198393100000200FCFF
410001983932000002009F7F
41000198393300000200FCFF
6100A0983934000120009F7F
6100A098393500012000FCFF
6100A0983936000120009F7F
6100A198393800010000FCFF
6100A1983939000100009F7F
6100A298394000593165FCFF
6100A2983941005931659F7F
6100A298394200593165FCFF
410001983943000002009F7F
41000198394400000200FCFF
410001983945000002009F7F
6100A098394600012000FCFF
6100A0983947000120009F7F
6100A098394800012000FCFF
6100A1983949000100009F7F
6100A198395000010000FCFF
6100A1983951000100009F7F
6100A298395200593165FCFF
6100A2983953005931659F7F
6100A298395400593165FCFF
410001983955000002009F7F
41000198395600000200FCFF
410001983957000002009F7F
6100A098395800012000FCFF
6100A0983959000120009F7F
6100A098396000012000FCFF
6100A1983961000100009F7F
6100A198396200010000FCFF
6100A1983963000100009F7F
6100A298396400593165FCFF
6100A2983965005931659F7F
6100A298396600593165FCFF
410001983967000002009F7F
41000198396800000200FCFF
410001983969000002009F7F
6100A098397000012000FCFF
6100A0983971000120009F7F
6100A098397200012000FCFF
6100A1983973000100009F7F
6100A198400000010000FCFF
6100A2984001005931659F7F
6100A298400300593165FCFF
410001984004000002009F7F
41000198400500000200FCFF
410001984006000002009F7F
6100A098400700012000FCFF
6100A0984008000120009F7F
6100A098400900012000FCFF
6100A1984010000100009F7F
6100A198401100010000FCFF
6100A2984013005931659F7F
6100A298401400593165FCFF
6100A2984015005931659F7F
41000198401600000200FCFF
410001984017000002009F7F
41000198401800000200FCFF
6100A0984019000120009F7F
6100A098402000012000FCFF
6100A1984022000100009F7F
6100A198402300010000FCFF
6100A1984024000100009F7F
6100A298402500593165FCFF
6100A2984026005931659F7F
6100A298402700593165FCFF
410001984028000002009F7F
41000198402900000200FCFF
410001984030000002009F7F
6100A098403100012000FCFF
6100A0984032000120009F7F
6100A098403300012000FCFF
6100A1984034000100009F7F
6100A198403500010000FCFF
6100A1984036000100009F7F
6100A298403800593165FCFF
6100A2984039005931659F7F
41000198404000000200FCFF
410001984041000002009F7F
41000198404200000200FCFF
6100A0984043000120009F7F
6100A098404400012000FCFF
6100A0984045000120009F7F
6100A198404600010000FCFF
6100A1984047000100009F7F
6100A198404800010000FCFF
6100A2984049005931659F7F
6100A298405000593165FCFF
6100A2984051005931659F7F
41000198405200000200FCFF
410001984053000002009F7F
41000198405400000200FCFF
6100A0984055000120009F7F
6100A098405600012000FCFF
6100A0984057000120009F7F
6100A198405800010000FCFF
6100A1984059000100009F7F
6100A198406000010000FCFF
6100A2984061005931659F7F
6100A298406200593165FCFF
6100A2984063005931659F7F
41000198406400000200FCFF
410001984065000002009F7F
41000198406600000200FCFF
6100A0984067000120009F7F
6100A098406800012000FCFF
6100A0984069000120009F7F
6100A198407000010000FCFF
6100A1984071000100009F7F
6100A198407200010000FCFF
6100A2984073005931659F7F
6100A298407400593165FCFF
6100A2984100005931659F7F
41000198410200000200FCFF
410001984103000002009F7F
6100A098410400012000FCFF
6100A0984105000120009F7F
6100A098410600012000FCFF
6100A1984107000100009F7F
6100A198410800010000FCFF
6100A1984109000100009F7F
6100A298411000593165FCFF
6100A2984111005931659F7F
6100A298411200593165FCFF
410001984113000002009F7F
41000198411400000200FCFF
410001984115000002009F7F
6100A098411600012000FCFF
6100A0984117000120009F7F
6100A098411800012000FCFF
6100A1984119000100009F7F
6100A198412000010000FCFF
6100A1984121000100009F7F
6100A298412200593165FCFF
6100A2984123005931659F7F
6100A298412400593165FCFF
410001984125000002009F7F
41000198412600000200FCFF
410001984127000002009F7F
6100A098412800012000FCFF
6100A0984129000120009F7F
6100A098413000012000FCFF
6100A1984131000100009F7F
6100A198413200010000FCFF
6100A1984133000100009F7F
6100A298413400593165FCFF
6100A2984135005931659F7F
6100A298413600593165FCFF
410001984138000002009F7F
41000198413900000200FCFF
6100A0984140000120009F7F
6100A098414100012000FCFF
6100A0984142000120009F7F
6100A198414300010000FCFF
6100A1984144000100009F7F
6100A198414500010000FCFF
6100A2984146005931659F7F
6100A298414700593165FCFF
6100A2984148005931659F7F
41000198414900000200FCFF
410001984150000002009F7F
41000198415100000200FCFF
6100A0984152000120009F7F
6100A098415300012000FCFF
6100A0984154000120009F7F
6100A198415500010000FCFF
6100A1984157000100009F7F
6100A298415800593165FCFF
6100A2984159005931659F7F
6100A298416000593165FCFF
410001984161000002009F7F
41000198416200000200FCFF
6100A0984164000120009F7F
6100A098416500012000FCFF
6100A0984166000120009F7F
6100A198416700010000FCFF
6100A1984168000100009F7F
6100A198416900010000FCFF
6100A2984170005931659F7F
6100A298417100593165FCFF
6100A2984172005931659F7F
41000198417400000200FCFF
6100A0984201000120009F7F
6100A098420200012000FCFF
6100A0984203000120009F7F
6100A198420400010000FCFF
6100A1984205000100009F7F
6100A198420600010000FCFF
6100A2984207005931659F7F
6100A298420800593165FCFF
410001984210000002009F7F
41000198421100000200FCFF
410001984212000002009F7F
6100A098421300012000FCFF
6100A0984214000120009F7F
6100A098421500012000FCFF
6100A1984216000100009F7F
6100A198421700010000FCFF
6100A1984218000100009F7F
6100A298421900593165FCFF
6100A2984220005931659F7F
6100A298422100593165FCFF
410001984223000002009F7F
41000198422400000200FCFF
6100A0984225000120009F7F
6100A098422600012000FCFF
6100A0984227000120009F7F
6100A198422800010000FCFF
6100A1984229000100009F7F
6100A198423000010000FCFF
6100A2984231005931659F7F
6100A298423200593165FCFF
6100A2984233005931659F7F
41000198423400000200FCFF
410001984235000002009F7F
41000198423600000200FCFF
6100A0984237000120009F7F
6100A098423800012000FCFF
6100A0984239000120009F7F
6100A198424000010000FCFF
6100A1984241000100009F7F
6100A198424200010000FCFF
6100A2984243005931659F7F
6100A298424400593165FCFF
6100A2984245005931659F7F
41000198424600000200FCFF
410001984247000002009F7F
41000198424800000200FCFF
6100A0984249000120009F7F
6100A098425000012000FCFF
6100A0984251000120009F7F
6100A198425200010000FCFF
6100A1984253000100009F7F
6100A198425400010000FCFF
6100A2984255005931659F7F
6100A298425600593165FCFF
6100A2984257005931659F7F
41000198425800000200FCFF
410001984259000002009F7F
41000198426000000200FCFF
6100A0984261000120009F7F
6100A098426200012000FCFF
6100A0984263000120009F7F
6100A198426400010000FCFF
6100A1984265000100009F7F
6100A198426600010000FCFF
6100A2984267005931659F7F
6100A298426800593165FCFF
6100A2984269005931659F7F
41000198427000000200FCFF
410001984271000002009F7F
41000198427200000200FCFF
6100A0984273000120009F7F
6100A098427400012000FCFF
6100A1984301000100009F7F
6100A198430200010000FCFF
6100A2984304005931659F7F
6100A298430600593165FCFF
410001984307000002009F7F
41000198430800000200FCFF
410001984309000002009F7F
6100A098431000012000FCFF
6100A0984311000120009F7F
6100A098431200012000FCFF
6100A1984313000100009F7F
6100A198431400010000FCFF
6100A1984315000100009F7F
6100A298431600593165FCFF
6100A2984317005931659F7F
41000198432000000200FCFF
410001984321000002009F7F
6100A098432200012000FCFF
6100A0984323000120009F7F
6100A098432400012000FCFF
6100A1984325000100009F7F
6100A198432600010000FCFF
41000198381200000200ED7F
6100A098437000012000FCFF
6100A098496400012000EC7F
6100A198236300010000FCFF
6100A098312400012000E97F
6100A198385300010000FCFF
41000198441800000200C37F
6100A198363600010000FCFF
6100A298253500593165F67F
6100A198327200010000FCFF
6100A198403600010000E17F
6100A198314900010000FCFF
410001983750000002009F7F
6100A298435200593165FCFF
6100A0984918000120009F7F
6100A198442300010000FCFF
6100A198495500010000F27F
6100A198294400010000FCFF
6100A2982947005931659F7F
41000198366600000200FDFF
41000198275500000200EF7F
6100A198357300010000FFFF
6100A0984118000120009F7F
6100A298350600593165FEFF
6100A2984073005931659F7F
41000198464800000200FCFF
41000198462400000200C47F
6100A298516600593165FCFF
410001985167000002009F7F
6100A198424200010000FCFF
6100A0984845000120009F7F
6100A298321500593165FCFF
6100A0983935000120009F7F
6100A298451100593165FCFF
6100A198313800010000ED7F
41000198373900000200FCFF
41000198427000000200EF7F
41000198485400000200FCFF
41000198245300000200F37F
6100A298315200593165FCFF
6100A0983862000120009F7F
6100A098445700012000FCFF
6100A198383000010000EF7F
6100A198435100010000FCFF
6100A298487400593165C77F
6100A298203900593165FCFF
6100A0982918000120009F7F
6100A298367400593165FCFF
6100A1984240000100009F7F
6100A098477100012000FCFF
6100A098525700012000D57F
6100A198362300010000FCFF
6100A198426400010000D27F
6100A098311200012000FCFF
6100A198365900010000FF7F
41000198415100000200FCFF
6100A0984735000120009F7F
6100A098244500012000FCFF
6100A198316300010000E67F
6100A098387300012000FCFF
41000198442900000200F87F
41000198456100000200FCFF
6100A1985065000100009F7F
6100A098450400012000FCFF
6100A298504500593165E67F
6100A098255300012000FCFF
6100A1983235000100009F7F
6100A198397300010000FCFF
6100A098311200012000EE7F
41000198371300000200FCFF
6100A2984306005931659F7F
41000198481800000200FCFF
6100A198453200010000F47F
6100A198506400010000FCFF
6100A298336000593165D37F
6100A098397100012000FCFF
41000198457400000200FB7F
6100A098343700012000FCFF
410001984040000002009F7F
6100A298457200593165FCFF
6100A098511000012000FF7F
6100A198453300010000FCFF
6100A1985066000100009F7F
6100A198244700010000FCFF
6100A1983355000100009F7F
6100A098400900012000FCFF
6100A198435000010000DD7F
6100A198435100010000FCFF
41000198492700000200D67F
6100A198372000010000FCFF
6100A2984232005931659F7F
6100A098480700012000FCFF
41000198252500000200F77F
6100A298321500593165FCFF
6100A098393600012000C07F
6100A198445800010000FEFF
6100A198301700010000FD7F
6100A098376400012000FCFF
410001984320000002009F7F
6100A198284600010000FCFF
6100A298367400593165EE7F
41000198235600000200FCFF
6100A298316400593165EE7F
6100A198384000010000FFFF
6100A1984361000100009F7F
6100A198490900010000FCFF
41000198333900000200E27F
6100A298386800593165FCFF
6100A2984414005931659F7F
6100A298493600593165FCFF
"Insert disc" is displayed approx. in the middle of this output. What does the output mean?
For an audio CD I get this:

Code: Select all

m 0
010005012933001440520000
010006012934001816150080
010006012935001816150000
010006012936001816150080
010007012937002217270000
010007012938002217270080
010007012939002217270000
010008012940002608390080
010008012941002608390000
010008012942002608390080
010009012943002959260000
010009012944002959260080
010009012945002959260000
010010012946003351150080
010010012947003351150000
010010012948003351150080
010011012949003735600000
010011012950003735600080
010011012951003735600000
010012012952004056240080
010012012953004056240000
010012012954004056240080
010013012955004413500000
010013012956004413500080
010013012957004413500000
010014012958004833390080
010014012959004833390000
010014012960004833390080
010015012961005121370000
010015012962005121370080
010015012963005121370000
010016012964005457380080
010016012965005457380000
010016012966005457380080
010017012967005845500000
010017012968005845500080
010017012969005845500000
010018012970006208200080
010018012971006208200000
010018012972006208200080
010019012973006549320000
010019012974006549320080
010019013000006549320000
010020013001007008600080
010020013002007008600000
010020013003007008600080
0100A0013004000100000000
0100A0013005000100000080
0100A0013006000100000000
0100A1013007002000000080
0100A1013008002000000000
0100A1013009002000000080
0100A2013010007350000000
0100A2013011007350000080
0100A2013012007350000000
010001013013000002000080
010001013014000002000000
010001013015000002000080
010002013016000335520000
010002013017000335520080
010002013018000335520000
010003013019000709610080
010003013020000709610000
010003013021000709610080
010004013022001105020000
010004013023001105020080
010008013600002608390000
010001014116000002000080
010004014571001105020000
010013015069004413500080
0100A2015568007350000000
010010020068003351150080
010014020550004833390000
010002021052000335520080
010006021628001816150000
010016022318005457380080
010017023048005845500000
010013023761004413500080
010002024643000335520000
010001025463000002000080
010101000140000003400000
0101010000280000022873A5
010101000010000002104B4F
01010100000200000202FFAA
010100000005000001692300
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
010100000004000001700000
010100000003000001710080
010100000002000001720000
010100000001000001730080
010100000000000001740000
010100000008000001660080
010100000007000001670000
010100000006000001680080
010100000005000001690000
010100000004000001700080
010100000003000001710000
010100000002000001720080
010100000001000001730000
010100000000000001740080
010100000008000001660000
010100000007000001670080
010100000006000001680000
010100000005000001690080
Anyway, I took another attempt to fix the CD drive. It's now working better than ever, always displaying the "insert disc" screen for the game disc, not making ticking noises anymore 8-) and playing audio CDs works great, without stuttering.

//Edit: I also found out that the debug data are not always the same. When I logged the data second time with the same (game) disc, they were different :o

rama3
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 510
Joined: Apr 16, 2017

Post by rama3 » September 23rd, 2017, 6:54 am

Oh well, I need to try harder documenting how my stuff is supposed to be used :p
Did you have both board #defines enabled (ARDUINO_BOARD + ATTINY_X5), or just ARDUINO_BOARD?

Your logs are almost correct. A PSX disc normally identifies with a leading 41.
Sampling seems to start with a one bit offset.
Since you get quite a lot of 61, my guess is that the internal oscillator in your chip is too far off from what I expected.
There's a tuning register for it. To use it, simply put this line in setup(): OSCCAL = 130;
Of course, you somehow have to find the correct value..
Your SPI flasher may be able to tell you what the default value is. Your target should be set pretty close to it, maybe default +/- 3 at max.

Update: First try disabling the debug prints. I remember they sometimes messed up sampling.

User avatar
Mek
Curious PSXDEV User
Curious PSXDEV User
Posts: 11
Joined: Sep 19, 2017
I am a: SW engineer
PlayStation Model: PS1
Location: Slovakia
Contact:

Post by Mek » September 23rd, 2017, 7:01 am

I only uncommented the define for ATTINY_X5. Will try disabling debugging, thanks.

//edit: btw. Atmel Studio programming tool allows me to calibrate internal oscillator I wonder if tinkering with that would help?

rama3
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 510
Joined: Apr 16, 2017

Post by rama3 » September 23rd, 2017, 7:19 am

Is that an automatic calibration tool? If so, it could help, yeah.

I really hope it's just the debug prints.
Checking the code against my logic analyzer captures, the only other explanation I can think of is that the device is too slow.
See Image

Or well, the clock could be too delayed, maybe due to the wires used or some other physical factor.

User avatar
Mek
Curious PSXDEV User
Curious PSXDEV User
Posts: 11
Joined: Sep 19, 2017
I am a: SW engineer
PlayStation Model: PS1
Location: Slovakia
Contact:

Post by Mek » September 23rd, 2017, 7:42 am

OK, I disabled debug output, but still no change. As you stated, the attiny is too slow - I thought it was already tested by someone else and working?
Anyway, I also have atmegas here, would for example atmega8 be better? I could also give it external crystal to be exactly at 8 MHz... or 16 MHz.
And there is still the option that only the CD drive somehow misread the data, and that it will work with the new CD drive, but it will arrive sometime next week so will just have to wait. Could changing the CD drive solve it, what do you think?

rama3
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 510
Joined: Apr 16, 2017

Post by rama3 » September 23rd, 2017, 7:51 am

The only thing that's bad is that single bit while sampling. The chip samples maybe a microsecond or two too late.
So no, the new drive won't fix this.

Are you sure the chip is running at 8Mhz and not 1Mhz by chance?

If you could get it to 16Mhz, it would definitely work. But you'd probably have to find an open pin for the crystal..
Probably easier to just use the ATmega8. It should be compatible to the regular ARDUINO_BOARD code.

The AtTiny was tested by yours truly, btw ;p
It worked well here, with these fuse settings: LFUSE 0xE2 HFUSE 0xDF

User avatar
Mek
Curious PSXDEV User
Curious PSXDEV User
Posts: 11
Joined: Sep 19, 2017
I am a: SW engineer
PlayStation Model: PS1
Location: Slovakia
Contact:

Post by Mek » September 23rd, 2017, 8:03 am

Yeah, those are the fuse settings I also used. The CKDIV fuse is unprogrammed meaning that frequency is not divided by 8.
Btw. the github page says:
ATtiny45: LFUSE 0xE2 HFUSE 0xDF > internal oscillator, full 8Mhz speed (supported, tested)
and ATtiny85 should work also - after all, it's just a "better" version of ATtiny45.
So I will try atmega8 with 16MHz crystal tomorrow. I will uncomment the define for ARDUINO_BOARD. Does the .ino file need any other adjustment when supposed to run @ 16 MHz?
Thanks so far, your answers are really helpful.

rama3
Verified
/// PSXDEV | ELITE ///
/// PSXDEV | ELITE ///
Posts: 510
Joined: Apr 16, 2017

Post by rama3 » September 23rd, 2017, 8:09 am

Give it one more try with 5V Vcc this time.
It will work on your board, since all output pins only drag lines low.
(It would not work on a later PSX, where data drives some high pulses.)

I also found this: https://www.hackster.io/porrey/attiny-16mhz-610d41
This sounds like all it requires is the low fuse to be "f1". High fuse stays at "df".

Using the ATmega8 would be an experiment. I developed this for ATmega32, but theoretically, the 2 chips should be compatible.

User avatar
Mek
Curious PSXDEV User
Curious PSXDEV User
Posts: 11
Joined: Sep 19, 2017
I am a: SW engineer
PlayStation Model: PS1
Location: Slovakia
Contact:

Post by Mek » September 23rd, 2017, 10:19 pm

I tried it with the 16 MHz clock, no success. Then I tried with 5V Vcc, no success.
Then I removed the attiny and used atmega328 with 16mhz crystal (which should be the same setup as arduino uno). In code I uncommented the define for ARDUINO_BOARD and compiled the .ino file for board "Arduino/Genuino Uno". Wrote the exported .hex file into the atmega using Atmel Studio, as always.
I figured out the pinouts according to datasheet like this:

Code: Select all

Port / Pin / Meaning
PD6 12 SQCK
PD7 13 SUBQ
PB0 14 DATA
PB1 15 GATE_WFCK
PD1 3 DEBUG
Still it doesn't work - only the "insert disc" screen. I also tried enabling the debug port. I also changed baud rate setting in putty to 500000 (I saw this is set up in code) but receiving only gibberish in putty. This gibberish is always the same, not random data. Other settings (parity, etc. are still the same as they were for attiny).
Capture.PNG
There's more of the data as the CD is read. I think the gibberish I made a screenshot of, is supposed to be the initial info of MCU frequency and "waiting for sqck".
I have read somewhere that running the chip at 16 MHz on 3.3V is outside the safe operation area. I tried a 12 MHz crystal, while also redefining F_CPU in the .ino file.

Code: Select all

#define ARDUINO_BOARD
#ifdef F_CPU
#undef F_CPU
#define F_CPU 12000000
#endif
But this didn't help either.
I tried to make the chip communicate standalone. Connected it only to 5 V Vcc+GND, and 16 MHz crystal with capacitors. There was still gibberish on pin 3 (TXD). With 12 MHz crystal, a different gibberish, tried also different baud rates for each crystal - 500000, 115200.
You do not have the required permissions to view the files attached to this post.

TheVidoja
What is PSXDEV?
What is PSXDEV?
Posts: 1
Joined: Sep 24, 2017

Post by TheVidoja » September 24th, 2017, 3:15 am

Hello everyone,
I successfully installed the last version of PsNee on my phat PS1. The board is a PU-23, and I used one of those cheap Arduino Nano clones that claim to be V3 and have onboard USB.
Because I flashed the Nano using the bootloader, I have to power it externally. Anyways, I think that the PS1 doesn't provide enough power to even power the Nano, because, when hooked up to the PS1 power, the Nano didn't even boot.

I just have one final question: do I have to keep the Nano powered up through my gaming sessions? Or can I power it off after booting the game?

If someone wants to know anything about my setup, just ask me! If I can help someone solve any problem or support the development, I'll do it :D

Thanks to everyone helping develop this software!
Best regards!

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests