From 4cc79b1ba83f4963f1fa88db53de5a753f4793d0 Mon Sep 17 00:00:00 2001 From: Peter Evans Date: Fri, 15 Dec 2017 21:01:15 -0600 Subject: [PATCH] Add 140k, 240k, decls for read/write --- include/apple2.dd.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/include/apple2.dd.h b/include/apple2.dd.h index b07d0cb..0c3805e 100644 --- a/include/apple2.dd.h +++ b/include/apple2.dd.h @@ -16,6 +16,20 @@ enum apple2dd_mode { DD_WRITE, }; +/* + * This is the length of a typical disk that is formatted in either DOS + * 3.3 or ProDOS. + */ +#define _140K_ 143360 + +/* + * And this is the length of a disk that has been formatted as a nibble + * file (*.NIB). This is not an Apple thing, exactly; it's more of an + * emulator thing, that emulators had used to try and get around copy + * protection in emulation. It does complicate disk drive operation! + */ +#define _240K_ 245760 + #define MAX_DRIVE_STEPS 70 /* @@ -97,5 +111,7 @@ extern int apple2dd_position(apple2dd *); extern void apple2dd_eject(apple2dd *); extern int apple2dd_insert(apple2dd *, FILE *); extern void apple2dd_shift(apple2dd *, int); +extern vm_8bit apple2dd_read_byte(apple2dd *); +extern void apple2dd_write_byte(apple2dd *, vm_8bit); #endif