C4ptFuture / cdtv-os235patch

Patch a v2.30 CDTV OS ROM image to create a v2.35 image
GNU General Public License v3.0
30 stars 2 forks source link

os2.35 + kick3.1 + non-autoconfig fastmem crashes CD0 on boot #3

Open pyksy opened 2 years ago

pyksy commented 2 years ago

I have a CDTV with Kickstart 3.1 + extended 2.35 ROMs and a 4MB non-autoconfig fastmem board ($200000 to $600000) installed in the CPU socket.

The animated CDTV startup screen is red. The CDTV will not boot from CD. The early startup menu lists CD0 as "Not bootable". Attempting to boot from a floppy result in an immediate "CD0 Program failed (error #8000000B)" software failure requester.

As a workaround disabling CD0 in the early startup boot options menu allows me to boot from a floppy disk without problems. I can then addmem the fast memory and it works just fine.

C4ptFuture commented 2 years ago

Hi, I have a couple of questions to help me narrow down possible causes:

  1. I assume you are using a stock CPU (68000). Is that correct or do you have an accelerator board installed as well?
  2. Does the issue also occur on the original Commodore 1.0 or 2.30 ROMs?
  3. Do you see the CD Audio player screen pop up and disappear quickly before you get the red error screen?

Some context about the red error screen: In the original 2.30 Commodore ROM, the red error screen can be caused by the following things.

  1. A CD-ROM is inserted that does not have a valid CDTV.tm license file.
  2. No disk drive is connected, or a floppy disk is inserted which is not bootable and not a DOS disk or it’s a DOS disk, but the checksum is incorrect.
  3. The CD Audio player application has started and has exited (it should never exit, only reboot the player)

In 2.35 option 1 should never occur, because the license file check has been rendered inoperable. I am assuming you don’t have a faulty floppy disk inserted (option 2), so that leaves option 3 as the most likely cause.

Now, as to the reason that the CD Audio Player can fail. Usually it is due to cdtv.device not initializing properly, which in turn can have many other causes, which we can eliminate once I have more info.

pyksy commented 2 years ago

Hi C4ptFuture,

About the causes:

  1. Correct: no accelerator board, but a 4MB fastram board sandwiched under the CPU
  2. I tested the board with the original ks1.3 + ext1.0 ROMs: quick audio player flash, then red tinted CDTV animation. Immediate software failure requester when attempting to boot from a floppy. Looks like an old bug I guess...
  3. Yes, I can see the audio player for a split second during the bootup before the red tinted CDTV animation

About the context:

  1. No CD in drive
  2. Floppy drive is connected, disks are known good and I can boot from them if I disable CD0 in the early startup menu first
  3. This could make sense

Whatever info you need just let me know. Thank you for the 2.35 update and for your help!

C4ptFuture commented 2 years ago

Hi and thx for the detailed report!

When the system is booted up, do you have any software that can show you a list of devices and boards/expansion devices that were autoconfig'ed? Sysinfo is one of many that can do that, but there are loads of others on Aminet. Specifically can you check if:

I suspect that cdtv.device (which is the low-level driver for the CD-ROM hardware) failed to initialize on your system, which could be confirmed by its absence in the device list.

cdtv.device can fail to initialize for multiple reasons, one of them is the fact that the DMAC could not be found in the system's list of Autoconfig'd devices. If the DMAC is also absent from the boards/expansion list on your system, then we are very close to understanding why you are getting the red screen and why the CD-ROM drive does not work.

Note: The reason the CD Audio player pops up before you get the red error screen is because the CDTV bootstrap module (cdstrap) does not check if cdtv.device was opened succesfully. As a result consequent IORequests fail and the function that checks if there's a CD present (and whether it's a CD-ROM or not) wrongly assumes a disc is present in the drive and that it is an Audio CD. The cdstrap module therefore launches the CD Audio player which immediately fails because it cannot open cdtv.device and exits -> cdstrap detects this and throws up the red error screen. The reason CD0: can crash with a Guru is because cdfs.library, which sits on top of cdtv.device, and is also responsible for creating CD0:, is probably not handling the absence of cdtv.device properly either.