Page 2 of 7

Re: Compiling X-Flash

Posted: April 10th, 2019, 1:44 am
by danhans42
Bit more research..

Looks like the 28SF040 uses the same software chip protection and commands as the 39Sxxx series.. The lock/unlock command sequence seems the same so will hit the sources this evening and see what I can fathom. Might be a simple case of detecting the chip and making it use the different flash routine that is used by the 29SF.

Re: Compiling X-Flash

Posted: April 11th, 2019, 1:33 pm
by Squaresoft74
Game Hunter Lite : UNKNOWN D0 01
Image

Password Card PS-121B : UNKNOWN D0 01
Image

PS Hacker : UNKNOWN 01 20
Image

Power Replay III : UNKNOWN 01 20
Image

Re: Compiling X-Flash

Posted: April 11th, 2019, 6:29 pm
by danhans42
Hi Squaresoft, thanks for the info..

The two cartridges that are detected as D0 01 should be supported in the last version on GitHub, as its the same ID's as the clone Sanyo I have already added in(see on Github) - so I would say its a counterfeit Intel flash part. Assume CSI is just some generic branding they have added.

A genuine Intel 28F010C should ID as 89 B4 (https://www.jaapsch.net/psion/pdffiles/ ... 28F010.pdf ) and possibly uses a different flash command sequence.

I will rename this part as GENERIC as we now have evidence of a few different flash parts using the same ID's.

Had a look at the other two, 01 20 is definitely the ID's Am29F010 which I think uses the same flash commands as most other parts already supported. http://noel.feld.cvut.cz/hw/amd/16736f1.pdf. I assume under the epoxy blob is just a clone part which has the same ID's as the 29F010

I will make the changes this evening and push the changes to Github, and post the binary on here.

After that xflash is pretty much on a feature freeze from me, I will keep adding unsupported flash parts in where possible and iron out any bugs but..

Major features will go into a fork project with a new name so it isn't confusing. This is so I can look at pushing my learning of coding on PlayStation (which is very very limited at the moment). The goal for this is for it to become more of a multi purpose tool with extra features such as serial support, nicer interface etc..

Re: Compiling X-Flash

Posted: April 11th, 2019, 8:33 pm
by Squaresoft74
Thanks Danhans42.
A friend of mine may have one more that's not in the database yet.
I'll let you know when i can see him and check the cartridge.

Since it's a resurrected project that can also resurrect bricked cartridges how about PhoeniX-Flash as project name ? :mrgreen:

Re: Compiling X-Flash

Posted: April 11th, 2019, 9:15 pm
by danhans42
That would be great, then we can hopefully get the flash support more complete.

On the name, I kind of wanted to lose "flash" from the name, as my idea is to make it more of a toolbox. The working title for my Wifi client is pstool, so might just name it the same. This is more to further my own learning and implement functions I would find useful.

My current wish list/todo list

* increase horizontal screen resolution (done)
* improve the interface - so its simpe but a bit prettier.
* remove credits - this can be left in the readme/sources (done)
* EXE upload via SIO
* BIN upload to address
* Dump PSX BIOS to SIO
* Dump Cart to SIO
* Flash Cart from SIO

The plan for this is side project would be more SIO orientated, as tools for this already exist for the AR/GS/XP using xflash/xkiller or caetla/catflap etc.

Re: Compiling X-Flash

Posted: April 12th, 2019, 3:22 am
by danhans42
Hi Squaresoft,

I have added AMD to the code, but I do not have any of those parts to test it - so use at your own risk. I have checked the datasheet and the flash protocol looks pretty much standard from the addressing and unlock code perspective, so it *should* work, but use at your own risk!


Xflash v1.2 b7
============

Added *untested* support for AMD 29F010 128k Flash (Manufacturer ID=0x10, DeviceID=0x20)
Renamed Sanyo.. to GENERIC 128k as this Man/Dev ID pair seem to be used on various parts.

Let me know how you get on.

Thanks

edit: wrong attachment - correct one now added (source included), will update github later.

Re: Compiling X-Flash

Posted: April 12th, 2019, 3:54 am
by Squaresoft74
Many thanks.
I will give it a try tomorow after redumping them first in case things go wrong.
Side question, can those carts be modded with something else ?
And if so what kind of eeprom would you suggest to get ?

Re: Compiling X-Flash

Posted: April 12th, 2019, 5:38 am
by danhans42
Yes they can, but I wouldnt try modding the powerplay iii, youd need to replace it with another PLCC, and they are so fragile its not worth the risk.. the other carts just disable the onboard chip and solder in a DIP32 socket and off you go.

As for what to recommend... I dont know what advantages a different eeprom would offer. I would stick with something supported like the SST 29EE010 or W29C020 personally but not sure if they are supported in the earlier versions of xflash.

Re: Compiling X-Flash

Posted: April 13th, 2019, 2:59 pm
by Squaresoft74
Thanks for the advice, please check your PMs for some feedback. :)

Re: Compiling X-Flash

Posted: April 13th, 2019, 7:03 pm
by danhans42
Changes now on github, thanks for the PM Squaresoft...

What's new in X-Flash v1.2 - Beta 7
-----------------------------------

- Added *untested* support for AMD 29F010 128k Flash (Manufacturer ID=0x10, DeviceID=0x20)
- Renamed Sanyo.. to GENERIC 128k as this Man/Dev ID pair seem to be used on various parts.
- Changed the maximum ROM limit. Was 128, now 4096. (Needs testing properly)s.

Compiled binaries are now on github too, so just grab the repo as a ZIP and off you go.

Re: Compiling X-Flash

Posted: April 13th, 2019, 9:10 pm
by Squaresoft74
Many thanks Dan. :)

Re: Compiling X-Flash

Posted: April 13th, 2019, 10:44 pm
by kHn
Just FYI, "D0 01" is not related to the manufacturer/device, the command has somehow failed.
Image
Image
Image


Flash caetla 0.38 and you should get "3C 02" lol.
Image
Image
Image

"00 00" is what you get when issuing the legacy SST identification command.

Re: Compiling X-Flash

Posted: April 13th, 2019, 11:19 pm
by danhans42
Excellent,

Well get involved then? I had no idea that anyone else was working on this as couldnt find anything public.

Back to the datasheets then to see if there is any differences in the commands/address used to pull the ID..

Re: Compiling X-Flash

Posted: April 29th, 2019, 9:05 am
by danhans42
What's new in X-Flash v1.2 - Beta 8

Serial Download Support - uses a standard simple serial cable

IMG_28042019_231455_(640_x_480_pixel).jpg

Serial Download

Xflash now supports download over SIO(serial). It runs at 115.2k reliably using a simple standard serial cable as you would use for psxserial etc... (only RxD/TxD/GND connected).

I have written a basic Python client to get you started. It uses Python 3.x and has been tested on Windows 10 x64 and Linux Mint 19.1 x64.

It also uses 'Pyserial' which is not installed by default. To install the module, run 'pip install pyserial' in a command line. On Linux this is usually straightforward.

If you have issues with this on Windows, the video below may be helpful :-

https://www.youtube.com/watch?v=Pf-cGzOQmXU%C2%A0

Dumprom.py will need editing to your serial port requirements. Edit the serialport='COM5' line at the top of the script, replacing the COM5 with whatever your port eg. serialport='/dev/ttyUSB0' etc

To dump a cart using dumprom.py
  • Firstly, read the cart into memory using L1 (Copy EEPROM into Main Mem).
  • Then press L2 (Dump Main Mem to SIO), followed by X to confirm.
  • On your PC run the python script - python dumprom.py dump.bin . You should see the PSX screen change accordingly.
  • Once complete, Xflash will return to the main menu and dumprom.py should write the file and close.
To dump your PSX BIOS using dumprom.py
  • Press L2 (Dump Main Mem to SIO), followed by X to confirm.
  • On your PC run the python script - python dumprom.py bios.bin . You should see the PSX screen change accordingly.
  • Once complete, Xflash will return to the main menu and dumprom.py should write the file and close.

Notes

If you dump your cart over SIO, it will always dump 512k no matter what size EEPROM is installed. You will need to trim this yourself to the correct size. Dumping the BIOS results in a 512Kb dump.

Also be careful! Dumprom.py will overwrite files without warning and has no exception handling at all, but I really couldn't be bothered writing a more elegant solution as it work. The protocol is very simple. Just open a serial connection at 115,200bps, then send the character c (0x99) and then read the 524,288bytes that are received into a file.

There isn't any form of checksum - but every dump I made (50+) of either the BIOS or a cart ROM was 100% verified against the source.

Source code is very messy so isn't currently included, the flash support is the same as the previous version.

Next steps - add upload to RAM from SIO, and also Flash from buffer.

Re: Newer X-Flash Builds

Posted: April 30th, 2019, 2:27 pm
by Squaresoft74
Many thanks for the update, still, i'm getting an error message when running the script:
Traceback (most recent call last):
File "dumprom.py", line 9, in <module>
import serial
ModuleNotFoundError: No module named 'serial
'

Tried in on my laptop with Windows 10 x86, Python 3.7.3 and Xrider's Serial to USB.

Any idea ?

Re: Newer X-Flash Builds

Posted: April 30th, 2019, 5:22 pm
by danhans42
Seems the Python serial module (pyserial) is not installed by default. Forgot about that ooops - I will add that in the readme.

On Windows, go to a command prompt and type 'pip install pyserial' on a command line. You will need to ensure you have Python and PIP in your path.. this is usually done on installation (in the options tick the box

You need to ensure pip/python is in your path. See the video guide below if you get stuck..

On linux running the command 'pip install pyserial'

https://www.youtube.com/watch?v=Pf-cGzOQmXU

I have edited the guide above.

PS. that serial cable looks cool, if not a little over-engineered.

On a side note.. I have a counterfeit FTDI232 that I have been using for development, and very often get timeout issues in Linux, but not in Windows. I thought this was down to my code but apparently not - this is common with clone/counterfeit FTDI232 parts under Linux. Just a word of warning - ALWAYS USE GENUINE FTDI - Amazon/eBay etc are always full of fakes so beware... or use something else like a CH340 or cp201x based part that you know to be genuine

Re: Newer X-Flash Builds

Posted: May 2nd, 2019, 1:16 pm
by Squaresoft74
Thanks Dan, worked like a charm so far (dumped a few bioses and carts).
Sure it's slower than LPT but it's a really nice addition you brought there ! :)
Any possibility to add a progress bar on psx side while transfer occurs ?

Re: Newer X-Flash Builds

Posted: May 2nd, 2019, 4:21 pm
by danhans42
Squaresoft74 wrote:
May 2nd, 2019, 1:16 pm
Thanks Dan, worked like a charm so far (dumped a few bioses and carts).
Sure it's slower than LPT but it's a really nice addition you brought there ! :)
Any possibility to add a progress bar on psx side while transfer occurs ?
Thanks for testing, and for the feedback.

Glad it worked for well you.

I will try and add a progress bar, there already is some routines for drawing this in x-flash so it shouldn't be too difficult. Once I get the upload part working well, I will look at a simple windows tool to make life a bit easier.

Other bits to implement are download size (128/256/384/512) and baud rate select for higher speeds - depending on how reliably they work.

I have also got the upload code working in a fashion.. So I can upload to the playstation, and can redownload and it verifies okay, just need to work on the flash from buffer part to finish it off.. and testing.

more to come, and thanks for testing.

Regards

Re: Newer X-Flash Builds

Posted: May 3rd, 2019, 5:57 pm
by danhans42
Have now added progress bar in the SIO send functions, which works perfectly and looks much better.

Started looking at building a client in VS... gave up after 15 minutes. Will stick with Python3 and look at using QT, Tkinter or something to get a GUI. Also tried running at higher speeds, only tried 230,400bps.. waste of time. Dumps the correct amount of bytes, but just complete junk. So will be sticking at 115,200bps for now.

Re: Newer X-Flash Builds

Posted: June 13th, 2019, 1:57 am
by danhans42
Quick update on this, as have been away for a bit with work and holiday.

Anyway, I now have successfully added both upload rom to RAM function, as well as flashing from RAM. I need to adjust the menus and text to make the menus accessible as well as the text. No checksum stuff in there, but I have tried 6 flashes, and each one verified 100% every time.

Have also been looking at adding the 39SF to it, but still struggling with getting byte write working. So that will have to wait. Also Squaresoft74 could do with having AMD 29F010 support adding, which is also a byte write type algo, so hopefully that will be two birds with one stone.

Next one, have named this 'fork' of xflash NXFLASH.. think it needed a new name in case anyone else forks it and versions and client apps get confusing. XFLASH/Tim will be duly credited for his great work prior in the docs and credits page.

I need to tidy up the code and menus/text a bit and will get a build out on here in the next few days. Also, the PC side tools will be python3 based as per the last version.

Few images - nothing too exciting.

Capture.PNG
IMG_12062019_155422_(640_x_480_pixel).jpg
IMG_12062019_155405_(640_x_480_pixel).jpg
New look - for now..
outfile.png