apple2js/test/js/formats/testdata/json.ts
Will Scullin 2daef8040f
Keep track of disk sides (#87)
Disk side information was being dropped and thus not displayable in the UI. This plumbs the value through various formats and adds some light testing.

Also fixes an issue where URL encoded hashes were not properly interpreted.
2021-10-02 11:45:09 -07:00

23 lines
492 B
TypeScript

import { base64_encode } from 'js/base64';
import { JSONDisk } from 'js/formats/types';
export const testDisk: JSONDisk = {
name: 'Test Disk',
disk: 'Front',
category: 'Test',
type: 'dsk',
encoding: 'base64',
data: []
};
const sector = new Uint8Array(256);
sector.fill(0);
for (let idx = 0; idx < 35; idx++) {
const track: string[] = [];
for (let jdx = 0; jdx < 16; jdx++) {
track.push(base64_encode(sector));
}
testDisk.data.push(track);
}