1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-06-25 12:29:34 +00:00

Fix some compile failures due to changed params

This commit is contained in:
Peter Evans 2018-02-19 20:03:25 -06:00
parent 508be6458a
commit 9f0d7f5413
2 changed files with 20 additions and 4 deletions

View File

@ -4,6 +4,14 @@
#include "apple2.enc.h"
#include "apple2.dd.h"
/*
* This is the DOS 3.3 order; just to have something to use as a basis
*/
static int sectab[] = {
0x0, 0x7, 0xe, 0x6, 0xd, 0x5, 0xc, 0x4,
0xb, 0x3, 0xa, 0x2, 0x9, 0x1, 0x8, 0xf,
};
/*
* Ripped from apple2.enc.c
*/
@ -103,7 +111,7 @@ Test(apple2_dec, track)
vm_segment_set(orig, i, 0xff);
}
apple2_enc_track(enc, orig, 0, 0);
apple2_enc_track(enc, orig, sectab, 0, 0);
apple2_dec_track(dec, enc, 0, 0);
for (i = 0; i < ENC_DTRACK; i++) {
@ -120,7 +128,7 @@ Test(apple2_dec, dos)
int i;
vm_segment_fread(seg, fp, 0, _140K_);
enc = apple2_enc_dos(seg);
enc = apple2_enc_dos(seg, sectab);
dec = vm_segment_create(1000000);
apple2_dec_dos(dec, enc);

View File

@ -4,6 +4,14 @@
#include "apple2.enc.h"
#include "vm_segment.h"
/*
* This is the DOS 3.3 order; just to have something to use as a basis
*/
static int sectab[] = {
0x0, 0x7, 0xe, 0x6, 0xd, 0x5, 0xc, 0x4,
0xb, 0x3, 0xa, 0x2, 0x9, 0x1, 0x8, 0xf,
};
/*
* A sector fixture; something we can use when testing sector encoding
* and decoding. This is the unencoded form of a sector, in 256 bytes.
@ -81,7 +89,7 @@ Test(apple2_enc, dos)
FILE *fp = fopen("../../build/karateka.dsk", "r");
vm_segment_fread(seg, fp, 0, _140K_);
enc = apple2_enc_dos(seg);
enc = apple2_enc_dos(seg, sectab);
cr_assert_neq(enc, NULL);
@ -185,7 +193,7 @@ Test(apple2_enc, track)
vm_segment_copy_buf(seg, f_sector, i * ENC_DSECTOR, 0, 256);
}
apple2_enc_track(dest, seg, 0, 0);
apple2_enc_track(dest, seg, sectab, 0, 0);
for (i = 0; i < ENC_ETRACK_HEADER; i++) {
cr_assert_eq(vm_segment_get(dest, i), 0xff);