Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Apple » Apple II » Taking Dos off a Dos 3.3 disk, and using the built in "Screen Display code?"
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Taking Dos off a Dos 3.3 disk, and using the built in "Screen Display code?" [message #347782] Sat, 08 July 2017 08:10 Go to next message
Anonymous
Karma:
Originally posted by: Tom Porter

If someone takes DOS off a 3.3 disk, it is replaced with a small snippet of code that can display a message, and if you sector edit it, can practically say anything you want.

Is there a simple method to replace the display code, and put something there, possibly 256 or 512 bytes of machine code you can run directly in this mode?

Also, was thinking about destroying/removing one of the catalog sectors, cleverly hiding disk identity that almost nobody would think of checking, because on a SECTORSCAN/MAP would appear the entire catalog TRACK 17 would be used...

Tom- Naspite
Re: Taking Dos off a Dos 3.3 disk, and using the built in "Screen Display code?" [message #347786 is a reply to message #347782] Sat, 08 July 2017 09:04 Go to previous messageGo to next message
Michael AppleWin Debu is currently offline  Michael AppleWin Debu
Messages: 1262
Registered: March 2013
Karma: 0
Senior Member
On Saturday, July 8, 2017 at 5:10:32 AM UTC-7, Tom Porter wrote:
> If someone takes DOS off a 3.3 disk, it is replaced with a small snippet of code that can display a message, and if you sector edit it, can practically say anything you want.

Tom,

_Which_ program are you using to do this?
_What_ is the boot sector, T0S0, that it is replaced with ?


> Is there a simple method to replace the display code, and put something there, possibly 256 or 512 bytes of machine code you can run directly in this mode?

Custom boot sectors are trivial to write for a "data disk" (aka a disk without any DOS/ProDOS/etc.)

- - - 8< hello_boot - - -

DRIVE_SLOT_X16 EQU $2B ; Drive Slot * 16
DRIVE_MOTOR_OFF EQU $C088
COUT EQU $FDED
APPLESOFT EQU $E000

ORG $800

; ------ Main ----- ; T0S0 $0800
DB $01 ; Tell C600 PROM to read 1 Sectors

STA DRIVE_MOTOR_OFF,X ; X=$60, drive slot*16

LDX #0
GetText
LDA Text,X
BEQ EndText
JSR COUT
INX
BNE GetText
EndText
JMP APPLESOFT

Text
ASC "Hello World Boot Sector"
DB 0

DS \,0 ; Pad until end-of-sector 0

- - - END - - -

Which assembles to:

0800:01 9D 88 C0 A2 00 BD 14
0808:08 F0 06 20 ED FD E8 D0
0810:F5 4C 00 E0 C8 E5 EC EC
0818:EF A0 D7 EF F2 EC E4 A0
0820:C2 EF EF F4 A0 D3 E5 E3
0828:F4 EF F2 00 00 00 00 00
0830:00 00 00 00 00 00 00 00
0838:00 00 00 00 00 00 00 00
0840:00 00 00 00 00 00 00 00
0848:00 00 00 00 00 00 00 00
0850:00 00 00 00 00 00 00 00
0858:00 00 00 00 00 00 00 00
0860:00 00 00 00 00 00 00 00
0868:00 00 00 00 00 00 00 00
0870:00 00 00 00 00 00 00 00
0878:00 00 00 00 00 00 00 00
0880:00 00 00 00 00 00 00 00
0888:00 00 00 00 00 00 00 00
0890:00 00 00 00 00 00 00 00
0898:00 00 00 00 00 00 00 00
08A0:00 00 00 00 00 00 00 00
08A8:00 00 00 00 00 00 00 00
08B0:00 00 00 00 00 00 00 00
08B8:00 00 00 00 00 00 00 00
08C0:00 00 00 00 00 00 00 00
08C8:00 00 00 00 00 00 00 00
08D0:00 00 00 00 00 00 00 00
08D8:00 00 00 00 00 00 00 00
08E0:00 00 00 00 00 00 00 00
08E8:00 00 00 00 00 00 00 00
08F0:00 00 00 00 00 00 00 00
08F8:00 00 00 00 00 00 00 00

Easy to use Copy ][ Plus Sector Editor to read/write this to T0S0.

> Also, was thinking about destroying/removing one of the catalog sectors, cleverly hiding disk identity that almost nobody would think of checking, because on a SECTORSCAN/MAP would appear the entire catalog TRACK 17 would be used...

The DOS 3.3. CATALOG is a linked listed so this is pretty trivial to do.

Sector Edit, Read Track $11, Sector $2.
Address: 01
From: 11 01
To: 00 00

Now you can hide your message on Track $11, Sector $1. It won't get over-written since when the disk was INIT'd the entire track $11 was marked "in use" by the VTOC. :-)

Other places to stash data is on Track 2 since DOS stupidly reserves the ENTIRE track even though only sectors $00 .. $04 sectors are used! NOTE: Pronto-DOS only uses Sector 0, so you have up to 15 sectors worth of data.

If you are curious how DOS 3.3 uses Tracks 0, 1, and 2 then you'll probably want to review my DOS 3.3 Color-Coded Hex Dump.

https://htmlpreview.github.io/?https://github.com/Michaelang el007/apple2_dos33/blob/master/dos33.html#ColorHexDump

Michael
Re: Taking Dos off a Dos 3.3 disk, and using the built in "Screen Display code?" [message #347790 is a reply to message #347786] Sat, 08 July 2017 11:24 Go to previous messageGo to next message
qkumba is currently offline  qkumba
Messages: 1584
Registered: March 2013
Karma: 0
Senior Member
> Other places to stash data is on Track 2 since DOS stupidly reserves the ENTIRE track even though only sectors $00 .. $04 sectors are used! NOTE: Pronto-DOS only uses Sector 0, so you have up to 15 sectors worth of data.

And Directi-DOS uses no sectors at all in track 2.
Various boot sector sources are on my Github site.
Other than the fact that the boot sector always loads to $800, there are no restrictions on what you can do, including moving the code to another location after it starts running.
Re: Taking Dos off a Dos 3.3 disk, and using the built in "Screen Display code?" [message #347791 is a reply to message #347782] Sat, 08 July 2017 11:31 Go to previous messageGo to next message
Michael AppleWin Debu is currently offline  Michael AppleWin Debu
Messages: 1262
Registered: March 2013
Karma: 0
Senior Member
On Saturday, July 8, 2017 at 5:10:32 AM UTC-7, Tom Porter wrote:
> If someone takes DOS off a 3.3 disk, it is replaced with a small snippet of code that can display a message, and if you sector edit it, can practically say anything you want.

I also should point out that due to DOS's dumb File System design you can't save/load ANY files on Track 0. One would have to change the BEQ to BMI in GETSEC, BEQ to BMI in FRESEC,and elsewhere.

i.e.
GETSEC
B244:AD 51 B5 LDA DCBATK ; GET ALLOCATED TRK
B247:F0 21 BEQ GSS1 ; BR IF NONE
Re: Taking Dos off a Dos 3.3 disk, and using the built in "Screen Display code?" [message #347792 is a reply to message #347790] Sat, 08 July 2017 11:39 Go to previous messageGo to next message
Michael AppleWin Debu is currently offline  Michael AppleWin Debu
Messages: 1262
Registered: March 2013
Karma: 0
Senior Member
On Saturday, July 8, 2017 at 8:24:03 AM UTC-7, qkumba wrote:

> And Directi-DOS uses no sectors at all in track 2.

TIL -- Good to know!

> Various boot sector sources are on my Github site.

I presume ...

https://github.com/peterferrie/0boot
https://github.com/peterferrie/Directi-DOS
https://github.com/peterferrie/standard-delivery
https://github.com/peterferrie/qboot

Did I miss any? :-)
(other then ProRWTS of course)
Re: Taking Dos off a Dos 3.3 disk, and using the built in "Screen Display code?" [message #347875 is a reply to message #347792] Sun, 09 July 2017 13:03 Go to previous messageGo to next message
qkumba is currently offline  qkumba
Messages: 1584
Registered: March 2013
Karma: 0
Senior Member
>> Various boot sector sources are on my Github site.
>
> I presume ...
>
> https://github.com/peterferrie/0boot
> https://github.com/peterferrie/Directi-DOS
> https://github.com/peterferrie/standard-delivery
> https://github.com/peterferrie/qboot
>
> Did I miss any? :-)
> (other then ProRWTS of course)

I think that's it. I will upload ProBoot at some point - 343 bytes loader of named (so not necessarily the first) .SYSTEM file from a ProDOS-format floppy. It allows block 1 to be used for storage.
Re: Taking Dos off a Dos 3.3 disk, and using the built in "Screen Display code?" [message #347882 is a reply to message #347875] Sun, 09 July 2017 14:10 Go to previous messageGo to next message
Michael AppleWin Debu is currently offline  Michael AppleWin Debu
Messages: 1262
Registered: March 2013
Karma: 0
Senior Member
On Sunday, July 9, 2017 at 10:03:52 AM UTC-7, qkumba wrote:
> I will upload ProBoot at some point - 343 bytes loader of named (so not necessarily the first) .SYSTEM file from a ProDOS-format floppy. It allows block 1 to be used for storage.

/sarcasm You mean no one uses an Apple /// and the Block 1? I'm shocked, shocked I tell you!
Re: Taking Dos off a Dos 3.3 disk, and using the built in "Screen Display code?" [message #347904 is a reply to message #347882] Sun, 09 July 2017 22:00 Go to previous message
Anonymous
Karma:
Originally posted by: Tom Porter

I forgot to check back on this one....

There is a nibble program I found that can do various things to your disk.... take dos off it (I find its not complete for pronto)... remove sectors from the VOC file table to make extra space, if you do not need to store 106 files ect..) https://www.dropbox.com/s/9bew2wusaa9wpr4/Stretcher.dsk?dl=0

Also included is another file I found recently, disk encryptor... very interesting

(With the above, if you have Pronto, take dos off, the extra 11 sectors, use copy plus to remove the additional dos junk and make only 10 sectors available for file table aka 70 files... you have 533 free sectors on your 'data or side B disk... not too bad!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Oz KFest 2017 registration is open
Next Topic: Getting input key without the cursor?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Apr 19 22:52:09 EDT 2024

Total time taken to generate the page: 0.30584 seconds