GideonZ / 1541ultimate

Official GIT archive of 1541 ultimate II sources
GNU General Public License v3.0
173 stars 45 forks source link

using the supersnapshot 5 cartridge on top of tree causes the Ultimate 64 bootup to fail. #305

Closed p2mate closed 1 year ago

p2mate commented 1 year ago

Tested with commit https://github.com/GideonZ/1541ultimate/commit/a4e063ef4da8d2d1c1f52ab941b2b82d04fc4786 I did not try to bisect which commit causes the problem but I suspect it might be https://github.com/GideonZ/1541ultimate/commit/63775c9547270bf5549c94987d73cf90628c4910 given it is related to the supersnapshot 5 handling. screenlog.txt

p2mate commented 1 year ago

Seems like Retro Replay also doesn't work..

GideonZ commented 1 year ago

Missing: steps to reproduce & binaries.

p2mate commented 1 year ago

now I broke it completely by trying to bisect the issue..

screenlog.txt

binary is binary.zip

any idea how to recover from this?

GideonZ commented 1 year ago

Hold restore on boot?

p2mate commented 1 year ago

sadly that doesn't work :(

p2mate commented 1 year ago

I still get

@ 20000000000000000000000000000000000000000000008EEEEEEEEEEEEEEEEEEEEEEEEE20000000000000000000000000000000000000000000002EEEEEEEEEEEEEEEEEEEEEEEDB7 23A

on the serial console and then the machine hangs

markusC64 commented 1 year ago

Well, unless Gideon has another idea, you have to make a recovery using your PC and an "USB Blaster". Do you happen to have an "USB Blaster"?

Edit: I guess you have hit the broken FPGA Blob while bisecting. It bricked my Ultimate 64 some time ago - according to Gideon it bricked older Ultimate 64s.

You should have asked ­- bug mentioned in the topic is already known, and obviously already solved - but Github does not contain a fixed FPGA.

Edit: If you really have hit the older FPGA, and your board is one of those which does not work with that FPGA, there is nothing you can do but using the »USB Blaster«. That will work, I already have had this issue.

markusC64 commented 1 year ago

@GideonZ The Github FPGA is still the one you announced me with: »...it is buggy with carts. Some carts make the firmware crash really hard, and when set to use that cart as startup.. yup.. bad.« on March 6th. So you already know about the original posting issue...

p2mate commented 1 year ago

Well, unless Gideon has another idea, you have to make a recovery using your PC and an "USB Blaster". Do you happen to have an "USB Blaster"?

Edit: I guess you have hit the broken FPGA Blob while bisecting. It bricked my Ultimate 64 some time ago - according to Gideon it bricked older Ultimate 64s.

You should have asked ­- bug mentioned in the topic is already known, and obviously already solved - but Github does not contain a fixed FPGA.

Edit: If you really have hit the older FPGA, and your board is one of those which does not work with that FPGA, there is nothing you can do but using the »USB Blaster«. That will work, I already have had this issue.

no I don't have a USB blaster.. I have a xilinx JTAG dongle but no idea if that helps. anyway, I can try to locate one.

markusC64 commented 1 year ago

Compared to Xilinx, ALtera/Intel USB Blasters are really cheap, so if you try "random" snapshots from github source code, having one is a better idea.

p2mate commented 1 year ago

the official one seems to be pretty expensive (https://www.mouser.fi/ProductDetail/Intel-Altera/PL-USB-BLASTER-RCN?qs=jblrfmjbeiFezz56mIHRCg%3D%3D) 282 Euro, however there seem to be plenty of clones. Do they work as well? The xilinx 'dongle' I have is also a clone and you can easily make one from a RPI0. https://www.fruugo.fi/usb-blaster-altera-cpldfpga-download-cable/p-124421069-261455335?language=en&ac=croud&asc=pmax is one of the clones for example

markusC64 commented 1 year ago

Well, my very cheap clone works fine... But since the altera / intel tools won't work with a raspberry, you will need to have a clone (or the original), you can't use a raspberry.

markusC64 commented 1 year ago

The clone you linked looks fine to me.

p2mate commented 1 year ago

ok. I will order that one, can you post the instructions on what to flash etc?

markusC64 commented 1 year ago

If @GideonZ could post updated instructions, that would be fine.

In the past, I was fine using the following two commands from Quartus (command line):

nios2-configure-sof to upload an FPGA. Older FPGAs allowed pressing RESTORE not to start any application, so especially no broken application is started. Newer FPGAs (their bootloader) just start the application with default settings when RESTORE is pressed. [edit: I really had cases where I had to use that older RESTORE feature]

nios2-download -g to upload an application (working FPGA required).

FPGA can be found in the "external/" directory of the repository. Application is build when compiling.

The application is build while compiling:

The application normally running on the U64 is ./target/software/nios2_u64/result/ultimate.elf

It can be used to start any updater you want.

./target/software/nios2_update_u64a4/result/update.elf Is the updater you may also start instead of the main application.

Edit: Note the above commands do not change anything on the flash. But they allow you to start the regular firmware updater again.

p2mate commented 1 year ago

Using your instructions, https://github.com/mithro/ixo-usb-jtag and a cypress FX2 development board I had lying around, I managed to get the machine back to life! Thank you! If you're interested, I can post the changes I made to ixo-usb-jtag somewhere.

markusC64 commented 1 year ago

Congrats.

Note you can use the same commands to test a firmware without flashing it if you have the .sof and the .elf file.

markusC64 commented 1 year ago

One important information: U64 builds from this repository do not use the contents of the fpga/ subdirectory, but use the supplied "external/u64.sof" fpga.

Thus bisect does not give you a helpfull commit - you will find it's one of the updates of external/u64.sof.

p2mate commented 1 year ago

Congrats.

Note you can use the same commands to test a firmware without flashing it if you have the .sof and the .elf file.

Yes indeed. Good reason to buy a USB blaster which I did now.

p2mate commented 1 year ago

One important information: U64 builds from this repository do not use the contents of the fpga/ subdirectory, but use the supplied "external/u64.sof" fpga.

Thus bisect does not give you a helpfull commit - you will find it's one of the updates of external/u64.sof.

No indeed.. I did use the external/u64.sof file. I think we can close this issue here.