English Amiga Board


Go Back   English Amiga Board > Other Projects > project.CD32 Conversion

 
 
Thread Tools
Old 27 February 2016, 11:23   #21
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
Thanks Patrik but it does not work.

I have added -allow-lowercase to the mkisofs command as follows:
mkisofs -quiet -V JOTD_GAMES -copyright JOTD_2016 -publisher JOTD -o %2.raw -allow-lowercase -relaxed-filenames -d -input-charset ASCII -output-charset ASCII -iso-level 3 -A "" -sysid CDTV %1

your script seems to perform properly, the CD boots (which doesn't work if I don't patch the .ISO) but it then cannot lock "C" directory, doesn't find "setpatch" ...

Last edited by jotd; 27 February 2016 at 11:42.
jotd is offline  
Old 27 February 2016, 11:45   #22
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
Quote:
Originally Posted by jotd View Post
Without it, it would work, but the UPPERCASE names are ugly, and I have a problem with my menu starter that scans files ending with ".start" in lowercase (that's lame!)
Noticed another issue with dots in filenames and mkisofs. You have to specify -ldots to have leading dots, else it will convert ".start" to "_start". Also, to be able to use dots anywhere inside the middle of the filename you have to specify -allow-multidot. Noticed this on "kick34005.a500.rtb" which turned into "kick34005_a500.rtb".

So now I am using the following commandline (which seems identical to yours except the dot-stuff added):
mkisofs -quiet -D -allow-lowercase -ldots -allow-multidot -V cd32comp -copyright none -publisher none -o cd32.raw -relaxed-filenames -d -input-charset ASCII -output-charset ASCII -iso-level 3 -A "" -sysid CDTV rootdir

Followed by the make_cd32_iso.py script and ending the process with pathTableUtil.py uppercase.

Strange that I am getting an iso that does work. Can there be some ordering issue or something that is different on windows? How does the order of the path table look at your end compared to when you create an iso with ISOCD?

Last edited by patrik; 27 February 2016 at 11:52.
patrik is offline  
Old 27 February 2016, 12:53   #23
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
Tested the iso on real hardware and it works fine there too. However, it seems like mkisofs orders the files in a very bad way for the CD32 or something as the boot time is really bad.

Have added a simple boot benchmark to the menu we are working on - when it has loaded everything and shows its screen, it records the number of ticks the system is at with dos.library/DateStamp(). As the CD32 has no RTC it will always be set to 0 ticks during reset, so can be used as a comparison to see how changes affect boot time.

It is ofcourse quite a bit higher than the total time your own code has spent booting as it is zeroed very early, several seconds before it even shows the boot anim, I approximated the zeroing by stopwatch to atleast 4 seconds before the CD starts booting, but as a comparison it is great.

Anyhow, enough blabbering, here are the results:
boot time with mkisofs iso: 16.54s
boot time with ISOCD iso (100% standard): 12.96s
boot time with ISOCD iso (prioritization from buildiso.sh): 11.96s

Last edited by patrik; 27 February 2016 at 13:18.
patrik is offline  
Old 27 February 2016, 15:58   #24
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
@Patrik: I'll check my path table. In the meanwhile, with all the problems induced by mkisofs (speed, compatibility), I guess I can still use it for my tests, and use ISOCD when producing the release for people to enjoy fast boot times.

Edit: start of my path table:

PathTable size: 1578
00000-00009(1):
00010-00019(1): C
00020-00031(1): DEVS
00032-00045(1): GAMES
00046-00057(1): LIBS
00058-00073(1): MENUDATA
00074-00083(1): S
00084-00099(2): DEVS/KEYMAPS
00100-00117(2): DEVS/KICKSTARTS
00118-00137(2): GAMES/ANOTHERWORLD
00138-00151(2): GAMES/APIDYA
00152-00167(2): GAMES/AWESOME
00168-00187(2): GAMES/BMXSIMULATOR
00188-00203(2): GAMES/CHASEHQ

Edit2: I had a hunch, and renamed all my dirs in uppercase (no problem with that). The cd went a little further.
Then I noticed that all the files starting with an uppercase letter were found, whereas the others (only lowercase) did not. I've created a small ISO, do you want me to zone it so you can analyse it?
The workaround would be to go deeper in your conversion: convert tables to first letter uppercase, and also all the filename references (that, you're not doing right now).

Last edited by jotd; 27 February 2016 at 16:20.
jotd is offline  
Old 27 February 2016, 16:25   #25
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
Patrik, I just checked, and you can add several root directories to mkisofs. Of course, you would have to create a rootdir with only priority items (C, S, DEVS??) and a rootdir with the games. Maybe that would be an equivalent for the optimization you perform with the isocd layout.
jotd is offline  
Old 27 February 2016, 19:07   #26
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
Quote:
Originally Posted by jotd View Post
Then I noticed that all the files starting with an uppercase letter were found, whereas the others (only lowercase) did not. I've created a small ISO, do you want me to zone it so you can analyse it?
Please zone it. I can take a look at it tomorrow, away right now.
patrik is offline  
Old 28 February 2016, 03:39   #27
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
zoned as "prince.zip". If you boot it you'll see that files like "Freeanim" are found whereas files like "cd32load" (starting with lowercase) are not found (same for C directory, worked for "s" strangely)
jotd is offline  
Old 28 February 2016, 16:20   #28
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
Quote:
Originally Posted by jotd View Post
zoned as "prince.zip". If you boot it you'll see that files like "Freeanim" are found whereas files like "cd32load" (starting with lowercase) are not found (same for C directory, worked for "s" strangely)
I currently have no simple solution ready for this issue, I just wanted to inform you that the issue is the ordering of directory entries containing the file and directory names.

The CD32 expects them to be sorted case insensitive, which is the way ISOCD orders them, while mkisofs orders them case sensitive.

Take a look at the order difference of your /C directory between mkisofs and ISOCD:
Code:
$ isoinfo -f -i prince.iso | grep ^/C/
/C/Assign;1
/C/Avail;1
/C/CDSpeed;1
/C/Copy;1
/C/Date;1
/C/Delete;1
/C/Dir;1
/C/Ed;1
/C/Edit;1
/C/Execute;1
/C/Freeanim;1
/C/Info;1
/C/MakeDir;1
/C/Mount;1
/C/Rename;1
/C/SetPatch;1
/C/Status;1
/C/Wait;1
/C/cd32load;1
/C/cdtest;1
/C/hardreset;1

$ isoinfo -f -i prince_isocd.iso | grep ^/C/
/C/Assign;1
/C/Avail;1
/C/cd32load;1
/C/CDSpeed;1
/C/cdtest;1
/C/Copy;1
/C/Date;1
/C/Delete;1
/C/Dir;1
/C/Ed;1
/C/Edit;1
/C/Execute;1
/C/Freeanim;1
/C/hardreset;1
/C/Info;1
/C/MakeDir;1
/C/Mount;1
/C/Rename;1
/C/SetPatch;1
/C/Status;1
/C/Wait;1
So the reason it worked for the S directory was that the only file there was lowercase. As long as the case is the same in a directory the ordering is consistent, so a temporary and ugly solution would be to use only lowercase or only uppercase names.
patrik is offline  
Old 28 February 2016, 16:27   #29
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
I understand that the search algorithm is not linear (rather bisect-like) and relies on the sorting of names.
Thanks for the info, I'll figure something out.

Edit: found that you can generate a sort file for mkisofs:

http://reboot.pro/topic/7032-need-he...-mkisofs-sort/

That would help right?

Last edited by jotd; 28 February 2016 at 16:59.
jotd is offline  
Old 28 February 2016, 17:30   #30
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
It would have been a neat solution to create a sort file with all the paths in the right order, but the docs say:
Code:
Note: this option does not sort the order of the file names that appear
in the ISO9660 directory. It sorts the order in which the file data is
written to the CD image.
I have tried several times now and it seems to be true, cannot get it to change the file/dir order.

However, it could be used for optimizing boot time and file loading in general.
patrik is offline  
Old 28 February 2016, 21:45   #31
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
I retract my earlier statement about the path table being ok, of course it is also sorted case insensitive amongst entries in the same directory. Mkisofs @#€%!.
patrik is offline  
Old 28 February 2016, 22:47   #32
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
Updated the pathTableUtil.py script so that it sorts the directory entries case-insesitive/uppercase order plus it also fixes the sorting of path table.

The directory entries reordering stuff got a bit ugly, but it works as far as I have tested and does generate a working prince cd .
patrik is offline  
Old 29 February 2016, 01:27   #33
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
I'll test that ASAP. Thanks! your python stuff is great.

Edit: it works fine. Thanks! your python stuff is great

BTW maybe you could host the CD32.TM/CDTV.TM python script from SysX in your github. I'm sure he'll be OK with that.
I'll create a all-in-one python tool with proper arg parsing to chain all scripts. BTW defining a "doit" method and nesting all the code would be a nice way to use your scripts as modules, whilst retaining the standalone functionality with if __name__ == "__main__". I've done that with the generateLayout.py script and it worked great.

Edit2: it's not working so good with another image I've got. Some files are not listed anymore. I'll try to create some reproducer of some sort. Damn this problem is tricky.
Some guy made a modification for case insensitive sorting in the link I found. Maybe it would be worth it to rebuild mkisofs with those changes. A lot of fun to build stuff on windows but that I can do.

Last edited by jotd; 29 February 2016 at 02:17.
jotd is offline  
Old 29 February 2016, 09:01   #34
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
Realized I forgot to update the parent numbers when resorting the path table. Pushed an updated version of the script, please retry if that was the only issue.

Last edited by patrik; 29 February 2016 at 10:47.
patrik is offline  
Old 29 February 2016, 12:40   #35
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
it wasn't.

I have zoned a .zip with 2 ISOs. First one works (uppercase) and the other (exact same files) does not when it looks for DEVS:Kickstarts/kickstart file

(as a bonus, the OK CD is a fully functional Another World CD32 release )

BTW Patrik when you're building an exe (launcher) for a CD, I create a CD configuration with added a harddrive where I copy the exe and access it with the test CD startup seq.
That way I don't have to re-create the ISO each time I update the exe, until the final release.

Last edited by jotd; 29 February 2016 at 12:49.
jotd is offline  
Old 29 February 2016, 12:57   #36
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
Quote:
Originally Posted by jotd View Post
it wasn't.

I have zoned a .zip with 2 ISOs. First one works (uppercase) and the other (exact same files) does not when it looks for DEVS:Kickstarts/kickstart file

(as a bonus, the OK CD is a fully functional Another World CD32 release )

BTW Patrik when you're building an exe (launcher) for a CD, I create a CD configuration with added a harddrive where I copy the exe and access it with the test CD startup seq.
That way I don't have to re-create the ISO each time I update the exe, until the final release.
Cheers, will take a look!

Regarding the btw, that is a good solution. However, if we just get the iso creation fast enough, you won't care. The < 10second ISOCD build for our 281MB iso already is borderline won't care. A mkisofs solution has even greater potential .

Last edited by patrik; 29 February 2016 at 13:17.
patrik is offline  
Old 29 February 2016, 13:15   #37
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
The problem was that I sorted on directory entry names including the last ";1" part of it. That made kick34005.A500 and kick34005.A500.RTB appear in the opposite order. Pushed a quick update.
patrik is offline  
Old 29 February 2016, 14:11   #38
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
it works now! thanks (that was worth)
jotd is offline  
Old 01 March 2016, 00:00   #39
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 926
I have cleaned up the code a bit and moved most of the directory entry functionality into its own class. Haven't looked at the if __name__ == "__main__" yet, but sounds like a good idea.
patrik is offline  
Old 01 March 2016, 03:45   #40
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,303
Tell me when it's in the git repo and I'll adapt it. Now we have a full windows native toochain, not up to your standards in terms of boot speed, but still very convenient.
jotd 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
Looking for some basic IP tools en SDK tools Roland007 support.WinUAE 0 28 November 2012 22:34
Tools alexh support.Hardware 15 05 August 2010 23:27
Need a few tools Phantomz request.Apps 6 22 November 2008 03:15
Tools? Kada project.Amiga Game Factory 1 05 February 2008 09:58
CD32 / Daemon tools lockup? Mclane support.WinUAE 0 01 April 2003 18:20

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 18:09.

Top

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