English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 31 December 2023, 14:53   #1
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
How to make a CDTV bootable disc?

What is required to make a bootable CDTV image using non-Amiga tools?

I have added C:RMTM from the devkit, and placed the CDTV.TM file in the root directory, but the image just stays on the spinning CDTV logo.

The devkit docs mentions "the fixtm program must be used to
complete the processing of the cdtv.tm file" ... any idea what this does?


From examining some working CDTV images I wonder if it might patch the start sector of CDTV.TM into the disc Application Data field, but I don't know how the value is calculated if that's the case. For example, on "AmigaJay CDTV Collection Vol.1.iso", the appdata field contains '544D0014 00005688 00000017...' and I found the CDTV.TM data at offsets $b800 and $16f800, but can't connect the two.
girv is offline  
Old 31 December 2023, 18:00   #2
CaptFuture
Registered User
 
CaptFuture's Avatar
 
Join Date: Aug 2020
Location: Netherlands
Posts: 25
Are you sure you're calling the RmTM program in your S:Startup-Sequence? This is what actually takes down the Trademark screen.

Edit: I see you mention the spinning CDTV logo, so the disc doesn't even start booting. Is this on a real machine or also in WinUAE? And does the title screen become red or does it just stay unchanged?

There's nothing really special about CDTV images. It's more or less standard ISO9660 and if you don't use FixTM or ISOCD to inject CDTV.tm into one of the "hidden" sectors that don't show up in the filesystem, you can still put in the root dir of the image as an alternative. Both methods are supported.

Last edited by CaptFuture; 31 December 2023 at 18:07.
CaptFuture is offline  
Old 31 December 2023, 19:06   #3
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
Use ISOCDWin (windows version of ISOCD). It can handle such stuff.
jotd is offline  
Old 31 December 2023, 20:07   #4
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
It's in WinUAE, I don't have a real CDTV. The spinning logo appears and turns red.

The startup-sequence runs C:RMTM
RMTM is in /C in the iso image.

I can't use ISOCDWin because I'm on macOS and I want to script it as part of my build.
girv is offline  
Old 31 December 2023, 21:27   #5
amiman99
Registered User
 
amiman99's Avatar
 
Join Date: Sep 2009
Location: San Antonio, TX USA
Age: 50
Posts: 1,185
I used this website as a guide and it worked fine.
http://acdldp.emuunlim.com/bootablecdr.shtml
amiman99 is offline  
Old 01 January 2024, 09:16   #6
CaptFuture
Registered User
 
CaptFuture's Avatar
 
Join Date: Aug 2020
Location: Netherlands
Posts: 25
Quote:
Originally Posted by girv View Post
It's in WinUAE, I don't have a real CDTV. The spinning logo appears and turns red.
The red error screen (in this case) indicates this is not a valid CDTV title. It’s when the CDTV.tm file is either not found or its contents are incorrect. Just to rule the latter out, here’s the MD5 sum of the CDTV.tm file:
Code:
bbe3ab461cefbd9318a29eda9f729340
As far as the CDFS boot options in the PVD. The boot options are 16-bit values each, followed by a 16-bit length value and then the actual data field. So the TM boot option is as follows:

Code:
54 4D 00 14  “TM” option, 20 bytes long
00 00 56 88  <— file size of CDTV.tm file = 22152
00 00 00 15  <— 1st sector where CDTV.tm is located
00 00 00 00  <— 2nd sector where CDTV.tm is located
00 00 00 00  <— 3rd sector where CDTV.tm is located
00 00 00 00  <— 4th sector where CDTV.tm is located
So in above example you should find CDTV.tm’s contents at sector $15 which should be at offset $A800 (sector size is 2048/$800 so $15 x $800).

CDFS allows for up to four sectors to store copies of the CDTV.tm file, so that if one copy is damaged, an alternate copy can be used. A value of zero is ignored. CDFS will examine these boot options and will pass all four sectors to cdstrap, which will attempt to load CDTV.tm from every one of these 4 locations (unless it’s zero) until it finds a match (the CDTV OS ROM contains an SBox compressed version of the CDTV.tm file which is also loaded into RAM, decompressed, and compared with the CDTV.tm on disc).

Quote:
Originally Posted by girv View Post
I can't use ISOCDWin because I'm on macOS and I want to script it as part of my build.
Using ISOCD for 99% of use cases is unneeded in my opinion as you can either put CDTV.tm in the root or use above boot options to hide it outside the filesystem. If you want to iterate quickly using a build pipeline you can safely ignore ISOCD. And then, if you really must use ISOCD for its specific settings regarding certain optimizations, you can use that at the last stage before you “release” your ISO.

Final tip: you can easily package ISOCD as a “fake” native macOS app (or any Amiga app):
  • Create a config with a bootable HDD with ISOCD on it in FS-UAE (or WinUAE with Wine. FS-UAE works a tad faster)
  • Make sure you have a local directory (e.g. Desktop or whatever you want) mounted as a secondary drive in FS-UAE/WinUAE so you can access your Mac filesystem from within ISOCD on e.g. DH1: )
  • Launch ISOCD inside FS-UAE/WinUAE and save the state of the machine
  • Create a commandline script that launches FS-UAE with the above config and make sure it launches with save state
  • Encapsulate the commandline script into a macOS app, rename it ISOCD and add a nice icon to it (google “macos run shell script as an app” or something similar to find out how)
Now you can call up ISOCD from macOS in an instant and close it when you’re done.

An example of the commandline I used with FS-UAE:

Code:
#!/bin/bash

/Applications/FS-UAE\ Launcher.app/Contents/FS-UAE.app/Contents/MacOS/fs-uae ~/Documents/FS-UAE/Configurations/A4000\ 3.1\ -\ CDTV-Tools.fs-uae --load-state=1
BTW, Happy New Year!
CaptFuture is offline  
Old 01 January 2024, 14:52   #7
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
Happy New Year

Very useful description of the CDFS fields, I was able to get it booting on CDTV with that

I've uploaded the build script I'm using here for the curious. All Python, nothing on the Amiga side.
https://gist.github.com/johngirvin/4...74176dc97b8f19
girv is offline  
Old 01 January 2024, 16:01   #8
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
OK, now, what do I do about the stream of INT2?
girv is offline  
Old 01 January 2024, 16:29   #9
CaptFuture
Registered User
 
CaptFuture's Avatar
 
Join Date: Aug 2020
Location: Netherlands
Posts: 25
Great! Nice to hear you got it working and thanks for sharing your code.

As for the INT2 barrage. Just send a CMD_STOP command to cdtv.device, which should disable INT2 6525 interrupts. If you ever need to re-enable them, just send a CMD_START.
CaptFuture is offline  
Old 01 January 2024, 18:23   #10
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,197
JST does that

https://github.com/jotd666/jst/blob/...rc/jst_deg.asm

called as follows

Code:
    move.l  #CMD_STOP,d0
    jsr AbsFun_Priv_SendCDTVCommand
	RESTORE_REGS
	rts
Sorry for the shitty macros BTW if you have the chance to send all .i files that are missing from your whdload sources... (like whdgirv.i, ...) that we don't have.
jotd is offline  
Old 02 January 2024, 01:43   #11
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
Quote:
Originally Posted by jotd View Post
BTW if you have the chance to send all .i files that are missing from your whdload sources... (like whdgirv.i, ...) that we don't have.

Done
girv is offline  
Old 02 January 2024, 01:45   #12
girv
Mostly Harmless
 
girv's Avatar
 
Join Date: Aug 2004
Location: Northern Ireland
Posts: 1,114
All working now


Stock 1Mb CDTV is super tight on memory on KS1.3 ... not sure if it will be reliable or work on later KS versions. I'm surprised it works at all on that configuration
girv is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
A590 - how to make it bootable? Howard81 support.Hardware 6 30 May 2010 18:06
Creating a bootable CD32 Disc Steve support.Hardware 14 04 September 2005 12:28
Bootable cd32 disc lpopman Coders. General 3 22 December 2004 13:46
Making a bootable CD32 disc edison3000 request.Apps 2 27 May 2003 07:53
Making a bootable CDTV picture Disc Pyromania Amiga scene 2 10 December 2002 07:38

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 04:29.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09684 seconds with 15 queries