mirror of
https://github.com/whscullin/apple2js.git
synced 2024-01-12 14:14:38 +00:00
Add JS typing to remaining disk types (#52)
This commit is contained in:
parent
715ea6ffaa
commit
ab748b3aa6
@ -16,6 +16,11 @@ import ProDOS from './po';
|
|||||||
|
|
||||||
import { numToString, debug } from '../util';
|
import { numToString, debug } from '../util';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a `Disk` object from a 2mg image.
|
||||||
|
* @param {*} options the disk image and options
|
||||||
|
* @returns {import('./format_utils').Disk}
|
||||||
|
*/
|
||||||
export default function _2MG(options) {
|
export default function _2MG(options) {
|
||||||
var OFFSETS = {
|
var OFFSETS = {
|
||||||
CREATOR: 0x04,
|
CREATOR: 0x04,
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
* implied warranty.
|
* implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a `Disk` object for a block volume with block-ordered data.
|
||||||
|
* @param {*} options the disk image and options
|
||||||
|
* @returns {import('./format_utils').Disk}
|
||||||
|
*/
|
||||||
export default function BlockVolume(options) {
|
export default function BlockVolume(options) {
|
||||||
var { rawData, readOnly, name } = options;
|
var { rawData, readOnly, name } = options;
|
||||||
var disk;
|
var disk;
|
||||||
|
@ -9,6 +9,11 @@
|
|||||||
* implied warranty.
|
* implied warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a `Disk` object from raw nibble image data.
|
||||||
|
* @param {*} options the disk image and options
|
||||||
|
* @returns {import('./format_utils').Disk}
|
||||||
|
*/
|
||||||
export default function Nibble(options) {
|
export default function Nibble(options) {
|
||||||
var { data, name, rawData, volume, readOnly } = options;
|
var { data, name, rawData, volume, readOnly } = options;
|
||||||
var disk = {
|
var disk = {
|
||||||
|
@ -184,6 +184,11 @@ function MetaChunk(data) {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a `Disk` object from Woz image data.
|
||||||
|
* @param {*} options the disk image and options
|
||||||
|
* @returns {import('./format_utils').Disk}
|
||||||
|
*/
|
||||||
export default function Woz(options) {
|
export default function Woz(options) {
|
||||||
var { rawData } = options;
|
var { rawData } = options;
|
||||||
var dv = new DataView(rawData, 0);
|
var dv = new DataView(rawData, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user