Browse Source

Miscellaneous

- Rename Dev.txt to ReadMe.txt for consistency
- Update Dev app Makefile to not copy the internal ReadMe file to the final output
- Remove obsolete constants in BPBIOS
- Minor patches to zx and cpmtools to workaround an odd behavior in Windows Subsystem for Linux that was  causing output to fail binary comparisons.
pull/259/head
Wayne Warthen 4 years ago
parent
commit
f5806a1589
  1. 2
      Source/Apps/Dev/Makefile
  2. 0
      Source/Apps/Dev/ReadMe.txt
  3. 8
      Source/BPBIOS/romwbw.lib
  4. 10
      Source/HBIOS/ay38910.asm
  5. 1
      Tools/unix/cpmtools/mkfs.cpm.c
  6. 20
      Tools/unix/zx/cpmredir.c
  7. 2
      Tools/unix/zx/zx.c

2
Source/Apps/Dev/Makefile

@ -1,5 +1,5 @@
OBJECTS = dev.com
DOCS = dev.txt
#DOCS = dev.txt
DEST = ../../../Binary/Apps
DOCDEST = ../../../Binary/Apps
TOOLS = ../../../Tools

0
Source/Apps/Dev/dev.txt → Source/Apps/Dev/ReadMe.txt

8
Source/BPBIOS/romwbw.lib

@ -14,14 +14,6 @@ MEMTOP EQU HBLOC - 1 ; Last usable address
;
HB_DEBUG EQU FALSE ; See hbios.z80 file
;
; TODO: Query system via HBIOS API to determine actual size of
; RAM and ROM, then adjust BPBIOS operation accordingly.
;
HB_RAMBANKS EQU 16 ; For systems with 512K of RAM
;HB_RAMBANKS EQU 32 ; For systems with 1MB of RAM
HB_ROMBANKS EQU 16 ; For systems with 512K of ROM
;HB_ROMBANKS EQU 32 ; For systems with 1MB of ROM
;
; Set HB_IODEV to desired HBIOS character device unit number
;
; TODO: Query system via HBIOS API to determine number of serial

10
Source/HBIOS/ay38910.asm

@ -522,7 +522,8 @@ AY_EI:
AY_WRTPSG:
CALL AY_DI
#IFDEF SBCV2004
LD A,8 ; SBC-V2-004 CHANGE
LD A,(RTCVAL) ; GET CURRENT RTC LATCH VALUE
OR %00001000 ; SBC-V2-004 CHANGE
OUT (RTCIO),A ; TO HALF CLOCK SPEED
#ENDIF
#IF (CPUFAM == CPU_Z180)
@ -540,7 +541,7 @@ AY_WRTPSG:
OUT0 (Z180_DCNTL),A ; AND RESTORE IT
#ENDIF
#IFDEF SBCV2004
LD A,0 ; SBC-V2-004 CHANGE TO
LD A,(RTCVAL) ; SBC-V2-004 CHANGE TO
OUT (RTCIO),A ; NORMAL CLOCK SPEED
#ENDIF
JP AY_EI
@ -552,7 +553,8 @@ AY_WRTPSG:
AY_RDPSG:
CALL AY_DI
#IFDEF SBCV2004
LD A,8 ; SBC-V2-004 CHANGE
LD A,(RTCVAL) ; GET CURRENT RTC LATCH VALUE
OR %00001000 ; SBC-V2-004 CHANGE
OUT (RTCIO),A ; TO HALF CLOCK SPEED
#ENDIF
#IF (CPUFAM == CPU_Z180)
@ -570,7 +572,7 @@ AY_RDPSG:
OUT0 (Z180_DCNTL),A ; AND RESTORE IT
#ENDIF
#IFDEF SBCV2004
LD A,0 ; SBC-V2-004 CHANGE TO
LD A,(RTCVAL) ; SBC-V2-004 CHANGE TO
OUT (RTCIO),A ; NORMAL CLOCK SPEED
#ENDIF
JP AY_EI

1
Tools/unix/cpmtools/mkfs.cpm.c

@ -220,6 +220,7 @@ int main(int argc, char *argv[]) /*{{{*/
#if 0
fprintf(stderr,"%d %04x %s\n",c,used+0x800,boot[c]);
#endif
memset(bootTracks+used+size, 0xe5, bootTrackSize-used-size);
if (size%drive.secLength) size=(size|(drive.secLength-1))+1;
used+=size;
close(fd);

20
Tools/unix/zx/cpmredir.c

@ -287,6 +287,8 @@ cpm_word fcb_read(cpm_byte *fcb, cpm_byte *dma)
redir_Msg(" (from %lx)\n", zxlseek(handle, 0, SEEK_CUR));
/* Read in the required amount */
memset(dma, 0x00, redir_rec_len);
#ifdef WIN32
{
@ -300,6 +302,12 @@ cpm_word fcb_read(cpm_byte *fcb, cpm_byte *dma)
rv = read(handle, dma, redir_rec_len);
#endif
if (rv == -1)
memset(dma, 0x00, redir_rec_len);
if ((rv >= 0) && (rv < redir_rec_len))
memset(dma + rv, 0x00, redir_rec_len - rv);
/* rd_len = length supposedly read, bytes. Round to nearest 128 bytes.
*/
rd_len = ((rv + 127) / 128) * 128;
@ -493,6 +501,9 @@ cpm_word fcb_randrd(cpm_byte *fcb, cpm_byte *dma)
if ((handle = redir_verify_fcb(fcb)) < 0) return 9; /* Invalid FCB */
if (zxlseek(handle, offs, SEEK_SET) < 0) return 6; /* bad record no. */
memset(dma, 0x00, redir_rec_len);
#ifdef WIN32
{
BOOL b;
@ -504,6 +515,13 @@ cpm_word fcb_randrd(cpm_byte *fcb, cpm_byte *dma)
#else
rv = read(handle, dma, redir_rec_len);
#endif
if (rv == -1)
memset(dma, 0x00, redir_rec_len);
if ((rv >= 0) && (rv < redir_rec_len))
memset(dma + rv, 0x00, redir_rec_len - rv);
zxlseek(handle, offs, SEEK_SET);
redir_put_fcb_pos(fcb, offs);
@ -579,6 +597,8 @@ cpm_word fcb_randwz(cpm_byte *fcb, cpm_byte *dma)
while (len < offs)
{
memset(zerorec, 0, sizeof(zerorec));
rl = sizeof(zerorec);
if ((offs - len) < sizeof(zerorec)) rl = offs - len;
#ifdef WIN32

2
Tools/unix/zx/zx.c

@ -227,6 +227,8 @@ void load_comfile(void)
}
fclose(fp);
memset(RAM + 0x0100 + com_len, 0, 0xFD00 - com_len);
Msg("Loaded %d bytes from %s\n", com_len, fname);
}

Loading…
Cancel
Save