Apple II disk images formats: .PO .DO and .IMG

REF: http://www.applelogic.org/TheAppleIIEGettingStarted.html

ProDOS-Order (.PO)

.PO disks contain logical disk bytes, i.e. blocks of 256 bytes each sorted by their logical block number. Since they are only used for dumping floppies, .PO images always have 560 blocks originating from 35 tracks of 16 sectors each. You can use the following translation table to find out about a sector’s physical block number:
Block: 0 1 2 3 4 5 6 7 8 9 A B C D E F Position: 0 8 1 9 2 A 3 B 4 C 5 D 6 E 7 F
This table mirrors ProDOS’ hard-coded interleaving. It is different from the one found on DOS 3.3 disks.

DOS-Order (.DO)

.DO disks contain logical disk bytes, i.e. blocks of 256 bytes each sorted by their logical block number. Since they are only used for dumping floppies, .DO images always have 560 blocks originating from 35 tracks of 16 sectors each. You can use the following translation table to find out about a sector’s physical block number:
Block: 0 1 2 3 4 5 6 7 8 9 A B C D E F Position: 0 7 E 6 D 5 C 4 B 3 A 2 9 1 8 F
This table mirrors DOS 3.3′ hard-coded interleaving. It is different from the one found on ProDOS disks.

NIB

.NIB images are copies of a disk’s nibblized disk bytes. Since they are pure copies without having gone through any sort of decoding, they work equally well for both DOS and ProDOS disks.
.NIB images are made up of 35 tracks. Each track has $1A00 (6656) bytes. There’s no header structure. The first disk byte of track 0 starts at file offset +0, the first byte of track 1 at file offset +$1A00, and so on

Backup WinRAR

Using WinRar as a backup tool.

Three backup mode (full, incremental and differential) described down are based upon Archive attribute.

Main options and how to restore:

BKP typeRAR option to createHow to restore if necessary
full-acjust restore the FULL backup
incremental-ac -aorestore first from last FULL backup and then all incremental from oldest to latest one
differential-aorestore first from last FULL backup and then only the last differential backup

winrar.exe a -se -rr3% -ac -ag+YYYYMMDD_full_ -k -m5 -ms -os -r -ep1 e:\mydoc.rar @mydocpath.txt

winrar.exe a -se -rr3% -ac -ag+YYYYMMDD_incr_ -k -m4 -ms -os -r -ep1 -ac -ao e:\mydoc.rar @mydocpath.txt

winrar.exe a -se -rr3% -ag+YYYYMMDD_diff_ -k -m4 -ms -os -r -ep1 -ao e:\mydoc.rar @mydocpath.txt
.\Rar a -ac -ao -ma5 -htb -agYYYYMMdd-hhmmss -r "%USERPROFILE%\Desktop\testbkp-.rar" w:\temp\test

-se = Create solid archive
-rr = add data recovery record
-ac = Clear Archive attribute after compression or extraction
-agxxxxxxxxxxxx
-k = Lock archive
-m<0..5> = Set compression level (0-store…3-default…5-maximal)
-ms
-os = Save NTFS streams
-r
-ao = add only the files with archive bit on
-ep1 Exclude base directory from names
-qo+ = Add quick open information

REF: https://rareelement.tripod.com/winrar_sk.htm

Blu-ray Manufacturer ID

Disc Manufacturer ID & Media Type ID Licensee List

REF: https://blu-raydisc.info/licensee-list/discmanuid-licenseelist.php accessed 2021.08.09.

The following companies have registered their Disc Manufacturer ID and Media Type ID.

Blu-ray Disc Recordable Format Version 1.0

Single Layer (SL)

ManufacturerDisc Manufacturer IDMedia Type IDWriting SpeedRecording TypeCapacity
Amethystum Storage Technology Co., Ltd.AMESOBR011-4XHTL25GB (12cm)
Amethystum Storage Technology Co., Ltd.AMESOBR021-6XHTL25GB (12cm)
Amethystum Storage Technology Co., Ltd.AMESOBR511-4XLTH25GB (12cm)
Amethystum Storage Technology Co., Ltd.AMESOBR521-6XLTH25GB (12cm)
Amethystum Storage Technology Co., Ltd.OTCBDR0011-4XHTL25GB (12cm)
Amethystum Storage Technology Co., Ltd.OTCBDR0021-6XHTL25GB (12cm)
AVIC UMEDISC (HK) LIMITEDUMEBDR0144xHTL25GB (12cm)
AVIC UMEDISC (HK) LIMITEDANWELLR044xLTH25GB (12cm)
AVIC UMEDISC (HK) LIMITEDUMEBDR1144xLTH25GB (12cm)
AVIC UMEDISC (HK) LIMITEDUMEBDR0166xHTL25GB (12cm)
AVIC UMEDISC (HK) LIMITEDUMEBDR1166xLTH25GB (12cm)
CMC Magnetics CorporationCMCMAGBA21-2XHTL25GB (12cm)
CMC Magnetics CorporationCMCMAGBA31-4XHTL25GB (12cm)
CMC Magnetics CorporationCMCMAGBA51-6XHTL25GB (12cm)
CMC Magnetics CorporationVERBATIMa1-2XHTL25GB (12cm) and 7.8GB (8cm)
CMC Magnetics CorporationVERBATIMc1-4XHTL25GB (12cm) and 7.8GB (8cm)
CMC Magnetics CorporationVERBATIMe1-6XHTL25GB (12cm)
CMC Magnetics CorporationVERBATIMw1-2XLTH25GB (12cm)
CMC Magnetics CorporationVERBATIMv1-4XLTH25GB (12cm)
CMC Magnetics CorporationVERBATIMu1-6XLTH25GB (12cm)
Hitachi Maxell, Ltd.MAXELLRS11-2XHTL12cm and 8cm
Hitachi Maxell, Ltd.MAXELLRS21-6XLTH                   25GB (12cm)
INFOMEDIA INC.INFOMER201-2X  
INFOMEDIA INC.INFOMER301-4XHTL12cm
INFOMEDIA INC.INFOMER401-6XHTL12cm
Info Source Digital Media (Zhong Shan) Co., Ltd.ISMMBDR011-4XHTL12cm
Info Source Digital Media (Zhong Shan) Co., Ltd.ISMMBDR021-6XHTL12cm
LG Electronics Inc.LGEBRAS041-4XHTL12cm (25GB)
LG Electronics Inc.LGEBRAS061-6XHTL12cm (25GB)
Millenniata, Inc.MILLENMR11-4XHTL25GB
Mitsubishi Chemical Media Co., Ltd.VERBATIMa1-2XHTL25GB (12cm) and 7.8GB (8cm)
Mitsubishi Chemical Media Co., Ltd.VERBATIMc1-4XHTL25GB (12cm) and 7.8GB (8cm)
Mitsubishi Chemical Media Co., Ltd.VERBATIMe1-6XHTL25GB (12cm)
Mitsubishi Chemical Media Co., Ltd.VERBATIMw1-2XLTH25GB (12cm)
Mitsubishi Chemical Media Co., Ltd.VERBATIMv1-4XLTH25GB (12cm)
Mitsubishi Chemical Media Co., Ltd.VERBATIMu1-6XLTH25GB (12cm)
Moser Baer India LtdPHILIPR021-2XHTL25GB
Moser Baer India LtdPHILIPR041-4XHTL25GB
Moser Baer India LtdMBIR061-6XHTL25GB
Moser Baer India LtdMBIF01 1-2XLTH25GB
Moser Baer India LtdMBIF021-4XLTH25GB
Moser Baer India LtdMBIF061-6XLTL25GB
Moser Baer India LtdMBIR02 1-2XHTL25GB
Moser Baer India LtdMBIR04 1-4XHTL25GB
Panasonic CorporationMEIT011-2XHTL 12cm
Panasonic CorporationMEIT021-4XHTL 12cm 
Panasonic CorporationMEIRA11-6XHTL12cm
PRODISCPRODISCR01-4XHTL25GB
PRODISCPRODISCR11-6XHTL25GB (12cm)
RITEK CORPORATIONRITEKBR11-2XHTL25GB
RITEK CORPORATIONRITEKBR21-4XHTL25GB
RITEK CORPORATIONRITEKBR31-6XHTL25GB
RITEK CORPORATIONRITEKBR41-6XHTL25GB
RITEK CORPORATIONRITEKBO11-4XLTH25GB
RITEK CORPORATIONRITEKBO21-6XLTH25GB
Sony CorporationSONYNO11-2XHTL25GB
Sony CorporationSONYNS11-2XHTL25GB
Sony CorporationSONYNS21-4XHTL25GB
Sony CorporationSONYNN11-2XHTL25GB
Sony CorporationSONYNN21-4XHTL25GB
Sony CorporationSONYNN31-6XHTL25GB
TAIYO YUDEN Co., Ltd.TYG-BDY011-2XLTH 
TAIYO YUDEN Co., Ltd.TYG-BDY031-4XLTH 
TAIYO YUDEN Co., Ltd.TYG-BDY051-6XLTH 
TDK CorporationTDKBLDRDA1-2XHTL 8cm
TDK CorporationTDKBLDRBA1-2XHTL 12cm
TDK CorporationTDKBLDRBB1-4XHTL 12cm
TDK CorporationTDKBLDRBD1-6xHTL12cm (25GB)
Victor Advanced media Co., Ltd.JVC-AMS6L1-6xLTH25GB (12cm)
Victor Advanced media Co., Ltd.JVCVAMS6L1-6xLTH25GB (12cm)

Blu-ray Disc Recordable Format Version 1.0

Dual Layer (DL)

ManufacturerDisc Manufacturer IDMedia Type IDWriting SpeedRecording TypeCapacity
CMC Magnetics CorporationVERBATIMb1-2XHTL50GB (12cm) and 15.6GB (8cm)
CMC Magnetics CorporationVERBATIMd1-4XHTL50GB (12cm)
CMC Magnetics CorporationVERBATIMf1-6XHTL50GB (12cm)
CMC Magnetics CorporationVAMKMIMf1-6XHTL50GB (12cm)
CMC Magnetics Corporation CMCMAGDl61-6XHTL50GB(12cm)
Mitsubishi Chemical Media Co., Ltd.VERBATIMb1-2XHTL50GB (12cm) and 15.6GB (8cm)
Mitsubishi Chemical Media Co., Ltd.VERBATIMd1-4XHTL50GB (12cm)
Mitsubishi Chemical Media Co., Ltd.VERBATIMf1-6XHTL50GB (12cm)
Mitsubishi Chemical Media Co., Ltd.VAMKMIMf1-6XHTL50GB (12cm)
Panasonic CorporationMEIT011-2XHTL12cm
Panasonic CorporationMEIT021-4XHTL12cm 
Panasonic CorporationMEIRB11-6XHTL12cm
RITEK CORPORATIONRITEKDR21-4XHTL50GB
RITEK CORPORATIONRITEKDR31-6XHTL50GB
Sony CorporationSONYND61-6XHTL 12cm (50GB)
Sony CorporationSONYND41-4XHTL 12cm (50GB)
TDK CorporationTDKBLDRFA1-2XHTL 12cm
TDK CorporationTDKBLDRFB1-4XHTL 12cm
TDK CorporationTDKBLDRFD1-6xHTL12cm (50GB)

Blu-ray Disc Recordable Format Version 3.0

Triple Layer (TL)

ManufacturerDisc Manufacturer IDMedia Type IDWriting SpeedRecording TypeCapacity
Amethystum Storage Technology Co., Ltd.AMESTBRT52-4XHTL100GB
CMC Magnetics CorporationCMCMAGTIF2-4XHTL100GB
CMC Magnetics CorporationVERBATIMk2-4XHTL100GB
CMC Magnetics CorporationVAMKMIMk2-4XHTL100GB
Panasonic CorporationPANRC42-4XHTL100GB(120mm)
Mitsubishi Chemical Media Co., Ltd.VERBATIMk2-4XHTL100GB
Mitsubishi Chemical Media Co., Ltd.VAMKMIMk2-4XHTL100GB
RITEK CORPORATIONRITEKTL12-4XHTL100GB
RITEK CORPORATIONRITEKTL22-4XHTL100GB
Sony CorporationSONYNT12-4XHTL100GB
TDK CorporationTDKBLDRNC2-4XHTL100GB

Blu-ray Disc Recordable Format Version 3.0

Quadruple Layer (QL)

ManufacturerDisc Manufacturer IDMedia Type IDWriting SpeedRecording TypeCapacity
SONY CorporationSONYNQ12-4XHTL128GB
SONY CorporationSONYNQ22-4XHTL128GB
TDK CorporationTDKBLDROC2-4XHTL128GB

Blu-ray Disc Rewritable Format Version 2.0

Single Layer (SL)

ManufacturerDisc Manufacturer IDMedia Type IDWriting SpeedRecording TypeCapacity
AVIC UMEDISC (HK) LIMITEDUMEBRE0121-2XHTL 25GB
CMC Magnetics CorporationCMCMAGCN21-2XHTL 25GB(12cm)
CMC Magnetics CorporationVERBATIM01-2X 25GB (12cm) and 7.8GB (8cm)
Hitachi Maxell, Ltd.MAXELLES11-2XHTL12cm and 8cm
LG Electronics, Inc.LGEBRES011-2XHTL12cm(25GB)
Mitsubishi Chemical Media Co., Ltd.VERBATIM01-2X 25GB (12cm) and 7.8GB (8cm)
Moser Baer India LtdPHILIPW021-2XHTL25GB
Moser Baer India LtdMBIE02 (changed on 3/31/2008)1-2XHTL25GB
Panasonic CorporationMEIT011-2XHTL 12cm
RITEK CORPORATIONRITEKBW11-2XHTL 25GB
Sony CorporationSONYES11-2X 25GB
TDK CorporationTDKBLDWDA1-2XHTL 8cm
TDK CorporationTDKBLDWBA1-2XHTL 12cm
JVC KENWOOD CorporationJVCRE11011-2XHTL 25GB (12cm)

Blu-ray Disc Rewritable Format Version 2.0

Dual Layer (DL)

ManufacturerDisc Manufacturer IDMedia Type IDWriting SpeedRecording TypeCapacity
CMC Magnetics CorporationVERBATIM11-2XHTL50GB(12cm)
Mitsubishi Chemical Media Co., Ltd.VERBATIM11-2XHTL50GB(12cm)
Panasonic CorporationMEIT011-2XHTL 12cm
RITEK CORPORATIONRITEKDW11-2XHTL50GB
Sony CorporationSONYED41-2XHTL50GB
TDK CorporationTDKBLDWfa1-2XHTL 12cm

Blu-ray Disc Rewritable Format Version 4.0

Triple Layer (TL)

ManufacturerDisc Manufacturer IDMedia Type IDWriting SpeedRecording TypeCapacity
CMC Magnetics CorporationVERBATIM42xHTL 100GB(120mm)
Mitsubishi Chemical Media Co., Ltd.VERBATIM42xHTL 100GB(120mm)
Panasonic CorporationPANEC21-2XHTL 100GB(120mm)
Sony CorporationSONYET12XHTL 100GB(120mm)
Sony CorporationSONYET22XHTL 100GB(120mm)

RAID Backup

SnapRAID is an application able to make a partial backup of your disk array. If some of the disks of your array fail, even if they are completely broken, you will be able to recover their content. It’s only a partial backup, because it doesn’t allow to recover from a failure of the whole array, but only if the number of failed disks are under a predefined limit.

https://www.snapraid.it

Blu-ray discs

Disc Manufacture ID list

BD Writing time

writer
speed
one layer
(minutes)
dual layer
(minutes)
1x90180
2x4590
4x2345
6x1530
8x1223
12x0815
ref: https://pt.wikipedia.org/wiki/Disco_Blu-ray

trivia: Disk or disc?

CGO inside Windows

What is CGO?

CGO lets Go packages call C code

Installing MSYS2

  • Download installer from https://www.msys2.org/ (current it’s msys2-x86_64-20200903.exe)
  • After install, inside MSYS terminal, using pacman, install gcc
pacman -S \
 mingw-w64-x86_64-binutils \
 mingw-w64-x86_64-crt-git \
 mingw-w64-x86_64-gcc \
 mingw-w64-x86_64-gcc-libs \
 mingw-w64-x86_64-gdb  \
 mingw-w64-x86_64-headers-git \
 mingw-w64-x86_64-libmangle-git   \
 mingw-w64-x86_64-libwinpthread-git \
 mingw-w64-x86_64-make \
 mingw-w64-x86_64-pkg-config \
 mingw-w64-x86_64-tools-git \
 mingw-w64-x86_64-winpthreads-git \
 mingw-w64-x86_64-winstorecompat-git 
  • now, configure bash initialization
# inside: ~/.bashrc

alias ll="ls -la --color"

export PATH=/s/go/bin:$PATH
export GOPATH=/w/work/go

Configure Windows Terminal

As explained in official guide…

{
 "guid": "{17da3cac-b318-431e-8a3e-7fcdefe6d114}",
 "name": "MINGW64 / MSYS2",
 "commandline": "S:/msys64/msys2_shell.cmd -defterm -here -no-start -mingw64",
 //"startingDirectory": "C:/msys64/home/%USERNAME%",
 "startingDirectory": "W:/work",
 "icon": "S:/msys64/mingw64.ico",
 "fontSize": 12,
 "colorScheme": "GitBash"
},
{
 "guid": "{2d51fdc4-a03b-4efe-81bc-722b7f6f3820}",
 "name": "MINGW32 / MSYS2",
 "commandline": "S:/msys64/msys2_shell.cmd -defterm -here -no-start -mingw32",
 // "startingDirectory": "C:/msys64/home/%USERNAME%",
 "startingDirectory": "W:/work",
 "icon": "S:/msys64/mingw32.ico",
 "fontFace": "Lucida Console",
 "fontSize": 12
},
{
 "guid": "{71160544-14d8-4194-af25-d05feeac7233}",
 "name": "MSYS / MSYS2",
 "commandline": "S:/msys64/msys2_shell.cmd -defterm -here -no-start -msys",
 // "startingDirectory": "C:/msys64/home/%USERNAME%",
 "startingDirectory": "W:/work",
 "icon": "S:/msys64/msys2.ico",
 "fontFace": "Lucida Console",
 "fontSize": 14
}

Testing

cd $GOPATH
go get github.com/mattn/go-sqlite3
go install github.com/mattn/go-sqlite3

Windows Terminal Git Bash

How to add Git Bash into Windows Terminal

Inside Windows Terminal, press CTRL+, to start editing “settings.json”

{
   "profiles": {
      "list": [
         {
            "guid": "{f9c3b687-50b7-4b13-b312-c28e955ed7d3}",
            "hidden": false,
            "name": "Git Bash",
            "commandline": "S:/app/Git/usr/bin/bash.exe -i -l",
            "startingDirectory": "W:/work",
            "icon": "S:/app/Git/mingw64/share/git/git-for-windows.ico",
            "snapOnInput": true,
            "closeOnExit": true,
            "colorScheme": "GitBash",
            "fontFace": "Consolas",
            "fontSize": 14
         }
      ]
   }
}

After this, add a custom color scheme named “GitBash”

"schemes": [
   {
      "name": "GitBash",
      "background": "#FFFFF0",
      "foreground": "#404040",
      "black": "#0C0C0C",
      "blue": "#6060ff",
      "brightBlack": "#767676",
      "brightBlue": "#3B78FF",
      "brightCyan": "#61D6D6",
      "brightGreen": "#16C60C",
      "brightPurple": "#B4009E",
      "brightRed": "#E74856",
      "brightWhite": "#F2F2F2",
      "brightYellow": "#F9F1A5",
      "cyan": "#3A96DD",
      "green": "#00a400",
      "purple": "#bf00bf",
      "red": "#bf0000",
      "white": "#ffffff",
      "yellow": "#bfbf00",
      "grey": "#bfbfbf"
   }
],

REFERENCES

https://stackoverflow.com/questions/56839307/adding-git-bash-to-the-new-windows-terminal