This commit is contained in:
Denis Molony 2019-11-22 15:42:07 +10:00
parent 0c2b017191
commit a4d173bea9
3 changed files with 31 additions and 5 deletions

View File

@ -17,6 +17,7 @@
- CPM disks
- Comprehensive disk listing
- woz format disks
- UniDos disks
### Documentation
* [Usage](resources/usage.md)
@ -25,7 +26,7 @@
* Install the **latest** version of the [Java Runtime Environment](http://www.oracle.com/technetwork/java/javase/downloads/index.html) (JRE or JDK).
* Download DiskBrowser.jar from the [releases](https://github.com/dmolony/diskbrowser/releases) page.
* Double-click the jar file, or enter 'java -jar DiskBrowser.jar' in the terminal.
* Set your root folder (where you keep your disk images).
* Set your root folder (the top-level folder where you keep your disk images).
### Example Screens
#### Disk listing

View File

@ -56,8 +56,9 @@ public abstract class HiResImage extends AbstractFile
// * $C1 PIC $0000 IIGS Super Hi-Res Image SHRPictureFile2
// $C1 PIC $0001 IIGS QuickDraw II PICT File SHRPictureFile2 *
// * $C1 PIC $0002 Super Hi-Res 3200 (Brooks) SHRPictureFile2 .3200
// $C1 PIC $2000 ?
// $C1 PIC $4950 ?
// $C1 PIC $2000 = $C1/0000
// $C1 PIC $4100 = $C1/0000
// $C1 PIC $4950 = $C1/0000
// $C1 PIC $8001 Allison raw image
// $C1 PIC $8002 Thunderscan
// $C1 PIC $8003 DreamGraphix
@ -66,6 +67,29 @@ public abstract class HiResImage extends AbstractFile
// $C3 PAL Paintworks palette
// ---- ---- ------ -------------------------------------- ------------------------
// packed unpacked
// $06.3200 1
// $06.3201 .
// $C0 0000 1
// $C0 0001 $C1 0000 . 1
// $C0 0002 1
// $C0 0003 $C1 0001 . .
// $C0 0004 $C1 0002 . 1
// $C0 1000 .
// $C0 8000 .
// $C0 8001 .
// $C0 8005 .
// $C0 8006 .
// $C1 2000 .
// $C1 4100 1
// $C1 4950 .
// $C1 8001 .
// $C1 8002 .
// $C1 8003 .
// 1 Graphics & Animation.2mg
//
static PaletteFactory paletteFactory = new PaletteFactory ();
static final byte[] pngHeader =

View File

@ -159,12 +159,13 @@ public class SHRPictureFile2 extends HiResImage
// 00000 - 31999 pixel data 32,000 bytes
// 32000 - 38399 200 color tables of 32 bytes each (one color table per scan line)
if (buffer.length < 38400)
if (buffer.length < 38400 && false)
{
failureReason = "Buffer should be 38,400 bytes";
return;
}
colorTables = new ColorTable[200];
int maxTables = (buffer.length - 3200) / 32;
colorTables = new ColorTable[maxTables];
for (int i = 0; i < colorTables.length; i++)
{
colorTables[i] = new ColorTable (i, buffer, 32000 + i * 32);