doco for applesoft formatting

This commit is contained in:
Denis Molony 2021-07-02 15:43:17 +10:00
parent 3e32b3caf0
commit c105d07e60
8 changed files with 43 additions and 3 deletions

View File

@ -53,7 +53,7 @@ Java runs on Windows, MacOS and Linux.
![Graphics](resources/graphics.png?raw=true "Graphics")
#### Applesoft Formatting and Analysis
Applesoft programs are displayed in a modern, easily-readable format. A comprehensive cross-listing of variables, strings, calls and jumps is available. Easily find duplicate variable names.
For the truly retro look, programs can be displayed in the original 40-column line wrap mode.
For the truly retro look, programs can be displayed in the [original 40-column line wrap](resources/basic.md) mode.
![Applesoft](resources/basic.png?raw=true "Applesoft")
#### Pascal code
![Pascal](resources/pascal.png?raw=true "Pascal")

8
resources/basic.md Normal file
View File

@ -0,0 +1,8 @@
###Applesoft program listing
Programs can be displayed in a variety of formats.
-Original but ugly
![Original](resources/basic1.png?raw=true "Truly awful")
-Some improvements
![Better](resources/basic2.png?raw=true "Better")
-Split lines
![Best](resources/basic3.png?raw=true "Best")

BIN
resources/basic1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

BIN
resources/basic2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

BIN
resources/basic3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

View File

@ -1,5 +1,6 @@
package com.bytezone.diskbrowser.disk;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
@ -23,6 +24,7 @@ import com.bytezone.diskbrowser.nufx.NuFX;
import com.bytezone.diskbrowser.pascal.PascalDisk;
import com.bytezone.diskbrowser.prodos.ProdosDisk;
import com.bytezone.diskbrowser.utilities.FileFormatException;
import com.bytezone.diskbrowser.utilities.HexFormatter;
import com.bytezone.diskbrowser.utilities.Utility;
import com.bytezone.diskbrowser.wizardry.Wizardry4BootDisk;
import com.bytezone.diskbrowser.wizardry.WizardryScenarioDisk;
@ -209,6 +211,14 @@ public class DiskFactory
return null;
}
}
else if ("bsq".equals (suffix))
{
if (debug)
System.out.println (" ** bsq **");
byte[] prefix = getPrefix (file);
System.out.println (HexFormatter.format (prefix));
String key = "FiLeStArTfIlEsTaRt";
}
FormattedDisk disk = null;
FormattedDisk disk2 = null;
@ -932,4 +942,22 @@ public class DiskFactory
return null;
}
// ---------------------------------------------------------------------------------//
private static byte[] getPrefix (File file)
// ---------------------------------------------------------------------------------//
{
byte[] buffer = new byte[1024];
try (BufferedInputStream bis = new BufferedInputStream (new FileInputStream (file)))
{
bis.read (buffer);
}
catch (IOException e)
{
e.printStackTrace ();
System.exit (1);
}
return buffer;
}
}

View File

@ -263,7 +263,7 @@ class DiskLayoutPanel extends JPanel implements DiskSelectionListener,
private void checkCorrectDisk (FormattedDisk newDisk)
{
if (newDisk instanceof HybridDisk)
newDisk = ((HybridDisk) newDisk).getCurrentDisk (); // never set to a Dual-dos disk
newDisk = ((HybridDisk) newDisk).getCurrentDisk (); // never set to a hybrid disk
if (newDisk != diskLayoutImage.getDisk ())
{
LayoutDetails layout = new LayoutDetails (newDisk);

View File

@ -24,4 +24,8 @@ StuffIt from America Online . . | .SIT | U | Macintosh
Zoo . . . . . . . . . . . . . . | .ZOO | U | IBM PC, Amiga, Atari ST,
| | | Unix systems
ARC . . . . . . . . . . . . . . | .ARC | U | IBM PC, Amiga, Atari ST
Compress . . . . . . . . . . . | .Z | U | Unix Systems
Compress . . . . . . . . . . . | .Z | U | Unix Systems
see also:
http://fileformats.archiveteam.org/wiki/Squeeze