Blog

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?

Raspberry Pico C++ dev with Mingw

How to prepare your environment in Windows operating system and compile your blink program written in C.

Prepare compiler environment

install MSYS2 from https://www.msys2.org/

configure windows terminal

{
  "profiles": {
   "list": [
            {
                "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",
                // "fontFace": "IBM 3270",
                // "fontWeight": "normal",
                "fontSize": 12,
                "colorScheme": "GitBash"
            },
...

using x86_64 version, inside shell, install packages

pacman -Syuu
pacman -S pacman -S mingw-w64-x86_64-make
pacman -S mingw-w64-x86_64-arm-none-eabi-gcc
pacman -S mingw-w64-x86_64-cmake

Download and compile source code

git clone -b master "https://github.com/raspberrypi/pico-sdk.git"
cd pico-sdk
git submodule update --init

export PICO_SDK_PATH=/w/work/rbpico/win/pico-sdk

git clone -b master "https://github.com/raspberrypi/pico-examples.git"
cd pico-examples/
git submodule update --init

mkdir build
cd build
cmake ../ -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Debug
mingw32-make

First, install SDK into Widows WSL2

wget https://raw.githubusercontent.com/raspberrypi/pico-setup/master/pico_setup.sh

export SKIP_VSCODE=1
export SKIP_UART=1
export OUTDIR=/mnt/w/work/rbpico

This script will set PICO_SDK_PATH, PICO_EXAMPLES_PATH, PICO_EXTRAS_PATH, PICO_PLAYGROUND_PATH


PS: the list of msys2 package can be browsed from: https://packages.msys2.org/package/

REF: https://stackoverflow.com/questions/33816778/cmake-nmake-makefiles-generator-fails-to-compile/38131177

Apple II Slot system

Apple II Slot System is the powerful and flexible system which every Apple II and Apple ][+ has.

Apple II has eight almost identical 50-pin expansion slots, named from SLOT0 up to SLOT7. They are almost identical because SLOT0 and SLOT7 are a little different from others.

SLOT0 is special because It DOES NOT HAVE the 256 bytes spaces (/IOSEL) as all others slots have. It is used typically for the firmware card or the 16 KB Apple II Language Card.

SLOT7 is special because it has the same signals all other slots have plus two exclusive signals. It is used for Video related boards, like PAL Encoder Card in Apple II EuroPlus. These two additional signals are: (1) on pin 35 a signal of 3.5Mhz COLOR REFerence from video generator; (2) on pin 19 the SYNC signal from video generator.

All I/O is memory mapped (6502 does not have exclusive I/O oriented instructions like z80 has). In Apple II architecture, a window of 4KB is reserved for I/O with addresses between $C000 and $CFFF, this memory range is called I/O space.

The 4KB I/O space is divided in two halves of 2KB each: (1) space for 8 slots I/O, addresses from $C000 to $C7FF; (2) common area for all slots, addresses from $C800 to $CFFF. In this first half, each slot has 16 bytes for register use plus 256 bytes for address use, in this space there is also the soft switches; The second half is shared among all slots, used when card’s firmware is big and the 256 bytes from slot exclusively are insufficient.

(128 bytes)
$C000..$C07F = Soft switches 

(16 bytes each region)
$C080..$C08F = Slot 0 /DEVSEL
$C090..$C09F = Slot 1 /DEVSEL
$C0A0..$C0AF = Slot 2 /DEVSEL
$C0B0..$C0BF = Slot 3 /DEVSEL
$C0C0..$C0CF = Slot 4 /DEVSEL
$C0D0..$C0DF = Slot 5 /DEVSEL
$C0E0..$C0EF = Slot 6 /DEVSEL
$C0F0..$C0FF = Slot 7 /DEVSEL

(256 bytes each region)
$C100..$C1FF = Slot 1 /IOSEL
$C200..$C2FF = Slot 2 /IOSEL
$C300..$C3FF = Slot 3 /IOSEL
$C400..$C4FF = Slot 4 /IOSEL
$C500..$C5FF = Slot 5 /IOSEL
$C600..$C6FF = Slot 6 /IOSEL
$C700..$C7FF = Slot 7 /IOSEL

(2048 bytes)
$C800..$CFFF = Common area (2KB ROM)

The common area for all slots has 2KB, in address range from $C800 to $CFFF. This area is shared among all slots. Whenever some slot wants to use data from its ROM mapped into this area is must access (read or write?) address $CFFF to deselect all eventually ROM that could be mapped into this area; after this the correct ROM should be selected. In summary, the protocol is simple: wherever somebody access address $CFFF, all cards that has a ROM mapped in common area must deselect it (inhibit its output).