PDA

View Full Version : Advanced selfbooting in Linux/Unix, the new nightmare...



timofonic
November 17th, 2005, 14:17
I was tried unsucessfully to creating a dreamcast selfboot disc in linux, here is a description of the process:


Used software:

- 1ST_READ.BIN file checker (scrambled/unscrambled, binary file renamed to "1strdchk") (http://www.consolevision.com/members/fackue/tools/projects/checker_vb2c_source.zip)
- uCON64 (http://ucon64.sourceforge.net)
- "hack" (http://web.elotrolado.net/attachment.php?s=&postid=1703501058) (open-source japanese very primitive binhack.exe clone.)
- dd (http://en.wikipedia.org/wiki/Dd_(Unix)) (unix command)
- cdrecord 2.01 (http://cdrecord.berlios.de/old/private/cdrecord.html)
- mkisofs (http://cdrecord.berlios.de/old/private/mkisofs.html)



Process:

$ cdrecord -scanbus dev=/dev/cdrom



Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling
cdrecord: Warning: Running on Linux-2.6.14
cdrecord: There are unsettled issues with Linux-2.5 and newer.
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
scsidev: '/dev/cdrom'
devname: '/dev/cdrom'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
scsibus0:
0,0,0 0) 'PLEXTOR ' 'CD-R PX-W4824A' '1.03' Removable CD-ROM
0,1,0 1) *
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *

$ dd if=/dev/zero bs=2352 count=300 of=audio.raw


300+0 registers readed
300+0 registers writed


$ cdrecord -dev=/dev/cdrom -v -multi -audio audio.raw speed=1


cdrecord: No write mode specified.
cdrecord: Asuming -tao mode.
cdrecord: Future versions of cdrecord may have different drive dependent defaults.
cdrecord: Continuing in 5 seconds...
Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling
cdrecord: Warning: Running on Linux-2.6.14
cdrecord: There are unsettled issues with Linux-2.5 and newer.
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
TOC Type: 0 = CD-DA
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: '/dev/cdrom'
devname: '/dev/cdrom'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
SCSI buffer size: 64512
atapi: 1
Device type : Removable CD-ROM
Version : 0
Response Format: 1
Vendor_info : 'PLEXTOR '
Identifikation : 'CD-R PX-W4824A'
Revision : '1.03'
Device seems to be: Generic mmc CD-RW.
Current: 0x0009
Profile: 0x0008
Profile: 0x0009 (current)
Profile: 0x000A
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
Drive buf size : 2394336 = 2338 KB
Drive DMA Speed: 12624 kB/s 71x CD 9x DVD
FIFO size : 4194304 = 4096 KB
Track 01: audio 0 MB (00:04.00) no preemp swab
Total size: 0 MB (00:04.00) = 300 sectors
Lout start: 1 MB (00:06/00) = 300 sectors
Current Secsize: 2048
ATIP info from disk:
Indicated writing power: 5
Is not unrestricted
Is not erasable
Disk sub type: Medium Type B, low Beta category (B-) (4)
ATIP start of lead in: -12369 (97:17/06)
ATIP start of lead out: 359849 (79:59/74)
Disk type: Short strategy type (Phthalocyanine or similar)
Manuf. index: 69
Manufacturer: Moser Baer India Limited
Manufacturer is guessed because of the orange forum embargo.
The orange forum likes to get money for recent information.
The information for this media may not be correct.
Blocks total: 359849 Blocks current: 359849 Blocks remaining: 359549
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
Starting to write CD/DVD at speed 4 in real TAO mode for multi session.
Last chance to quit, starting real write 0 seconds. Operation starts.
Waiting for reader process to fill input buffer ... input buffer ready.
BURN-Free is OFF.
Performing OPC...
Starting new track at sector: 0
Track 01: 0 of 0 MB written.
Track 01: Total bytes read/written: 705600/705600 (300 sectors).
Writing time: 7.111s
Average write speed 1.4x.
Fixating...


$ cdrecord -dev=/dev/cdrom -msinfo



cdrecord: Warning: Running on Linux-2.6.14
cdrecord: There are unsettled issues with Linux-2.5 and newer.
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
0,11702



$ 1strdchk data/mybinary.bin



data/mybinary.bin is unscrambled


$ ucon64 --scr data/mybinary.bin



uCON64 2.0.0 Unix (Linux) 1999-2005
Uses code from various people. See 'developers.html' for more!
This may be freely redistributed under the terms of the GNU Public License

/home/timofonic/selfb/data/mybinary.bin

Dreamcast



4671272 Bytes (35.6390 Mb)

Padded: Maybe, 4 Bytes (0.0000 Mb)
Intro/Trainer: Maybe, 83752 Bytes
Interleaved/Swapped: No
Backup unit/emulator header: No
Checksum (CRC32): 0x3307c1e6

Wrote output to: mybinary.bin


$ 1strdchk data/mybinary.bin



data/mybinary.bin is scrambled


$ ./hack data/mybinary.bin 11702



$ ucon64 --mkip --parse=mytemplate



uCON64 2.0.0 Unix (Linux) 1999-2005
Uses code from various people. See 'developers.html' for more!
This may be freely redistributed under the terms of the GNU Public License

Setting CRC to B6D8 (was 0000)
Wrote backup to: ip.bak
Wrote output to: ip.bin
Setting CRC to B6D8 (was 0000)
Wrote backup to: ip.bak
Wrote output to: ip.bin



Copying 1ST_READ.BIN (or as named) to data/

$ mkisofs -l -r -C 0,11702 -V TIMOFONIC -G ip.bin -o tmp.iso data/



mkisofs: Warning: -C specified without -M: old session data will not be merged.
Total translation table size: 0
Total rockridge attributes bytes: 6754
Total directory bytes: 18432
Path table size(bytes): 132
Max brk space used 21000
14998 extents written (29 MB)


$ cdrecord -dev=/dev/cdrom -xa tmp.iso speed=1



cdrecord: No write mode specified.
cdrecord: Asuming -tao mode.
cdrecord: Future versions of cdrecord may have different drive dependent defaults.
cdrecord: Continuing in 5 seconds...
Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling
cdrecord: Warning: Running on Linux-2.6.14
cdrecord: There are unsettled issues with Linux-2.5 and newer.
cdrecord: If you have unexpected problems, please try Linux-2.4 or Solaris.
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: '/dev/cdrom'
devname: '/dev/cdrom'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.
Device type : Removable CD-ROM
Version : 0
Response Format: 1
Vendor_info : 'PLEXTOR '
Identifikation : 'CD-R PX-W4824A'
Revision : '1.03'
Device seems to be: Generic mmc CD-RW.
Using generic SCSI-3/mmc CD-R/CD-RW driver (mmc_cdr).
Driver flags : MMC-3 SWABAUDIO BURNFREE
Supported modes: TAO PACKET SAO SAO/R96P SAO/R96R RAW/R16 RAW/R96P RAW/R96R
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
Starting to write CD/DVD at speed 4 in real TAO mode for single session.
Last chance to quit, starting real write 0 seconds. Operation starts.
Track 02: Total bytes read/written: 6750208/6750208 (3296 sectors).


The binary file was "unscrambled" and then converted by uCON64 to "scrambled", I think binaries on selfboot must be scrambled but still without boot on dreamcast appearin the cd-audio player of the bios showing the 2nd track. Anyone could help me on this about what am I failing? Thanks a lot...



Referenfes:

http://www.linux-sh.org/shwiki/Dreamcast
http://dev.gentoo.org/~vapier/dreamcast/BOOTING-HOWTO
http://www.gameskb.com/uwe/Forum.aspx/playstation-2/2759/Burning-emulators-using-Linux