forked from MirrorRepos/RomWBW
13 changed files with 389 additions and 8724 deletions
@ -1,111 +0,0 @@ |
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|||
; btromwbw.inc 2/17/2013 dwg - boot up CP/M, RomWBW Style ; |
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|||
; Unlike the Monahan style of booting, the RomWBW loading ; |
|||
; is performed by reading in the metadata sector and using ; |
|||
; the three words at the end of the sector to determine the ; |
|||
; loading address and starting location. ; |
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|||
|
|||
;-------------- BOOT UP CPM FROM HARD DISK ON S100COMPUTERS IDR BOARD ---------------- |
|||
|
|||
;BOOT UP THE 8255/IDE Board HARD DISK/Flash Memory Card |
|||
;NOTE CODE IS ALL HERE IN CASE A 2716 IS USED |
|||
|
|||
HBOOTWBW: |
|||
POP HL ;CLEAN UP STACK |
|||
|
|||
CALL INITILIZE_IDE_BOARD ;Initilze the 8255 and drive (again just in case) |
|||
|
|||
LD D,11100000B ;Data for IDE SDH reg (512bytes, LBA mode,single drive) |
|||
LD E,REGshd ;00001110,(0EH) CS0,A2,A1, |
|||
CALL IDEwr8D ;Write byte to select the MASTER device |
|||
|
|||
LD B,0FFH ;Delay time to allow a Hard Disk to get up to speed |
|||
WaitInitX: |
|||
LD E,REGstatus ;Get status after initilization |
|||
CALL IDErd8D ;Check Status (info in [D]) |
|||
BIT 7,D |
|||
JR Z,SECREADX ;Zero, so all is OK to write to drive |
|||
;Delay to allow drive to get up to speed |
|||
PUSH BC |
|||
LD BC,0FFFFH |
|||
DXLAY2X: LD D,2 ;May need to adjust delay time to allow cold drive to |
|||
DXLAY1X: DEC D ;to speed |
|||
JR NZ,DXLAY1X |
|||
DEC BC |
|||
LD A,C |
|||
OR B |
|||
JR NZ,DXLAY2X |
|||
POP BC |
|||
DJNZ WaitInitX ;If after 0FFH, 0FEH, 0FDH... 0, then drive initilization problem |
|||
IDErrorX: |
|||
LD HL,DRIVE_NR_ERR ;Drive not ready |
|||
JP ABORT_ERR_MSG |
|||
|
|||
SECREADX: ;Note CPMLDR will ALWAYS be on TRK 0,SEC 1,Head 0 |
|||
CALL IDEwaitnotbusy ;Make sure drive is ready |
|||
JR C,IDErrorX ;NC if ready |
|||
LD D,1 ;Load track 0,sec 1, head 0 |
|||
LD E,REGsector ;Send info to drive |
|||
CALL IDEwr8D |
|||
|
|||
LD D,0 ;Send Low TRK# |
|||
LD E,REGcyLSB |
|||
CALL IDEwr8D |
|||
|
|||
LD D,0 ;Send High TRK# |
|||
LD E,REGcyMSB |
|||
CALL IDEwr8D |
|||
|
|||
LD D,SEC_COUNT ;Count of CPM sectors we wish to read |
|||
LD E,REGcnt |
|||
CALL IDEwr8D |
|||
|
|||
LD D,CMDread ;Send read CMD |
|||
LD E,REGCMD |
|||
CALL IDEwr8D ;Send sec read CMD to drive. |
|||
CALL IDEwdrq ;Wait until it's got the data |
|||
|
|||
LD HL,CPM_ADDRESS ;DMA address where the CPMLDR resides in RAM |
|||
LD B,0 ;256X2 bytes |
|||
LD C,SEC_COUNT ;Count of sectors X 512 |
|||
MoreRD16X: |
|||
LD A,REGdata ;REG regsiter address |
|||
OUT (IDECport),A |
|||
|
|||
OR IDErdline ;08H+40H, Pulse RD line |
|||
OUT (IDECport),A |
|||
|
|||
IN A,(IDEAport) ;read the LOWER byte |
|||
LD (HL),A |
|||
INC HL |
|||
IN A,(IDEBport) ;read the UPPER byte |
|||
LD (HL),A |
|||
INC HL |
|||
|
|||
LD A,REGdata ;Deassert RD line |
|||
OUT (IDECport),A |
|||
DJNZ MoreRD16X |
|||
DEC C |
|||
JR NZ,MoreRD16X |
|||
|
|||
LD E,REGstatus ;Check the R/W status when done |
|||
CALL IDErd8D |
|||
BIT 0,D |
|||
JR NZ,IDEerr1X ;Z if no errors |
|||
LD HL,STARTCPM |
|||
LD A,(HL) |
|||
CP 31H ;EXPECT TO HAVE 31H @80H IE. LD SP,80H |
|||
JP Z,STARTCPM ;AS THE FIRST INSTRUCTION. IF OK JP to 100H in RAM |
|||
JP ERR_LD1 ;Boot Sector Data incorrect |
|||
|
|||
IDEerr1X: |
|||
LD HL,IDE_RW_ERROR ;Drive R/W Error |
|||
JP ABORT_ERR_MSG |
|||
|
|||
;;;;;;;;;;;;;;;;;;;;;; |
|||
; eof - btromwbw.inc ; |
|||
;;;;;;;;;;;;;;;;;;;;;; |
|||
|
|||
@ -1,111 +0,0 @@ |
|||
; |
|||
;================================================================================================== |
|||
; ROMWBW 2.X CONFIGURATION FOR N8 5/8/2012 |
|||
;================================================================================================== |
|||
; |
|||
; BUILD CONFIGURATION OPTIONS |
|||
; |
|||
CPUFREQ .EQU 20 ; IN MHZ, USED TO COMPUTE DELAY FACTORS |
|||
; |
|||
|
|||
; |
|||
DEFCON .EQU CIODEV_UART ; DEFAULT CONSOLE DEVICE (LOADER AND MONITOR): CIODEV_UART, CIODEV_VDU, DIODEV_PRPCON |
|||
ALTCON .EQU DEFCON ; ALT CONSOLE DEVICE (USED WHEN CONFIG JUMPER SHORTED) |
|||
DEFVDA .EQU VDADEV_N8V ; DEFAULT VDA (VDADEV_NONE, VDADEV_VDU, VDADEV_CVDU, VDADEV_7220, V\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ |
|||
DEFEMU .EQU EMUTYP_TTY ; DEFAULT EMULATION TYPE (EMUTYP_TTY, EMUTYP_ANSI, ...) |
|||
; |
|||
|
|||
RAMSIZE .EQU 512 ; SIZE OF RAM IN KB, MUST MATCH YOUR HARDWARE!!! |
|||
|
|||
CLRRAMDISK .EQU CLR_AUTO ; CLR_ALWAYS, CLR_NEVER, CLR_AUTO (CLEAR IF INVALID DIR AREA) |
|||
; |
|||
DSKMAP .EQU DM_RAM ; DM_ROM, DM_RAM, DM_FD, DM_IDE, DM_PPIDE, DM_SD, DM_PRPSD, DM_PPPSD |
|||
; |
|||
DSKYENABLE .EQU FALSE ; TRUE FOR DSKY SUPPORT (DO NOT COMBINE WITH PPIDE) |
|||
; |
|||
UARTENABLE .EQU TRUE ; TRUE FOR UART SUPPORT (ALMOST ALWAYS WANT THIS TO BE TRUE) |
|||
UARTFIFO .EQU TRUE ; TRUE ENABLES UART FIFO (16550 ASSUMED, N8VEM AND ZETA ONLY) |
|||
UARTAFC .EQU FALSE ; TRUE ENABLES AUTO FLOW CONTROL (YOUR TERMINAL/UART MUST SUPPORT RTS/CTS FLOW CONTROL!!!) |
|||
; |
|||
VDUENABLE .EQU FALSE ; TRUE FOR VDU BOARD SUPPORT |
|||
CVDUENABLE .EQU FALSE ; TRUE FOR CVDU BOARD SUPPORT |
|||
UPD7220ENABLE .EQU FALSE ; TRUE FOR uPD7220 BOARD SUPPORT |
|||
N8VENABLE .EQU TRUE ; TRUE FOR N8 (TMS9918) VIDEO/KBD SUPPORT |
|||
; |
|||
DEFIOBYTE .EQU $00 ; DEFAULT INITIAL VALUE FOR CP/M IOBYTE, $00=TTY, $01=CRT (MUST HAVE CRT HARDWARE) |
|||
ALTIOBYTE .EQU DEFIOBYTE ; ALT INITIAL VALUE (USED WHEN CONFIG JUMPER SHORTED) |
|||
WRTCACHE .EQU TRUE ; ENABLE WRITE CACHING IN CBIOS (DE)BLOCKING ALGORITHM |
|||
DSKTRACE .EQU FALSE ; ENABLE TRACING OF CBIOS DISK FUNCTION CALLS |
|||
; |
|||
FDENABLE .EQU FALSE ; TRUE FOR FLOPPY SUPPORT |
|||
FDMODE .EQU FDMODE_N8 ; FDMODE_DIO, FDMODE_ZETA, FDMODE_DIDE, FDMODE_N8, FDMODE_DIO3 |
|||
FDTRACE .EQU 1 ; 0=SILENT, 1=FATAL ERRORS, 2=ALL ERRORS, 3=EVERYTHING (ONLY RELEVANT IF FDENABLE = TRUE) |
|||
;; |
|||
FDMEDIA .EQU FDM144 ; FDM720, FDM144, FDM360, FDM120 (ONLY RELEVANT IF FDENABLE = TRUE) |
|||
FDMEDIAALT .EQU FDM720 ; ALTERNATE MEDIA TO TRY, SAME CHOICES AS ABOVE (ONLY RELEVANT IF FDMAUTO = TRUE) |
|||
FDMAUTO .EQU TRUE ; SELECT BETWEEN MEDIA OPTS ABOVE AUTOMATICALLY |
|||
; |
|||
IDEENABLE .EQU FALSE ; TRUE FOR IDE SUPPORT |
|||
IDEMODE .EQU IDEMODE_DIO ; IDEMODE_DIO, IDEMODE_DIDE |
|||
IDETRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) |
|||
IDE8BIT .EQU FALSE ; USE IDE 8BIT TRANSFERS (PROBABLY ONLY WORKS FOR CF CARDS!) |
|||
IDECAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) |
|||
; |
|||
PPIDEENABLE .EQU FALSE ; TRUE FOR PPIDE SUPPORT (DO NOT COMBINE WITH DSKYENABLE) |
|||
PPIDEMODE .EQU PPIDEMODE_STD ; PPIDEMODE_STD, PPIDEMODE_DIO3 |
|||
PPIDETRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF PPIDEENABLE = TRUE) |
|||
PPIDE8BIT .EQU FALSE ; USE IDE 8BIT TRANSFERS (PROBABLY ONLY WORKS FOR CF CARDS!) |
|||
PPIDECAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) |
|||
PPIDESLOW .EQU FALSE ; ADD DELAYS TO HELP PROBLEMATIC HARDWARE (TRY THIS IF PPIDE IS UNRELIABLE) |
|||
; |
|||
SDENABLE .EQU FALSE ; TRUE FOR SD SUPPORT |
|||
SDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) |
|||
SDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) |
|||
SDCSIO .EQU TRUE ; TRUE IF USING THE CSIO PORT (N8 ONLY) |
|||
SDCSIOFAST .EQU FALSE ; TRUE IF USING THE LOOKUP TABLE RATHER THAN SHIFTS AND ROTATES (N8 ONLY) |
|||
PPISD .EQU FALSE ; TRUE IF USING PPISD MINI-BOARD (DO NOT COMBINE WITH PPIDE) |
|||
S2ISD .EQU FALSE ; TRUE IF USING SCSI2IDE BOARD (DO NOT COMBINE WITH PPISD) |
|||
; |
|||
PRPENABLE .EQU FALSE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) |
|||
PRPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) |
|||
PRPSDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF PRPSDENABLE = TRUE) |
|||
PRPSDCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) |
|||
PRPCONENABLE .EQU TRUE ; TRUE FOR PROPIO CONSOLE SUPPORT (PS/2 KBD & VGA VIDEO) |
|||
; |
|||
PPPENABLE .EQU FALSE ; TRUE FOR PARPORTPROP SUPPORT |
|||
PPPSDENABLE .EQU TRUE ; TRUE FOR PROPIO SD SUPPORT (FOR N8VEM PROPIO ONLY!) |
|||
PPPSDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF PPPENABLE = TRUE) |
|||
PPPSDCAPACITY .EQU 64 ; CAPACITY OF PPP SD DEVICE (IN MB) |
|||
PPPCONENABLE .EQU TRUE ; TRUE FOR PROPIO CONSOLE SUPPORT (PS/2 KBD & VGA VIDEO) |
|||
; |
|||
HDSKENABLE .EQU FALSE ; TRUE FOR SIMH HDSK SUPPORT |
|||
HDSKTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF IDEENABLE = TRUE) |
|||
HDSKCAPACITY .EQU 64 ; CAPACITY OF DEVICE (IN MB) |
|||
; |
|||
PPKENABLE .EQU TRUE ; TRUE FOR PARALLEL PORT KEYBOARD |
|||
PPKTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF PPKENABLE = TRUE) |
|||
KBDENABLE .EQU FALSE ; TRUE FOR PS/2 KEYBOARD ON I8242 |
|||
KBDTRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF KBDENABLE = TRUE) |
|||
; |
|||
TTYENABLE .EQU TRUE ; INCLUDE TTY EMULATION SUPPORT |
|||
ANSIENABLE .EQU TRUE ; INCLUDE ANSI EMULATION SUPPORT |
|||
ANSITRACE .EQU 1 ; 0=SILENT, 1=ERRORS, 2=EVERYTHING (ONLY RELEVANT IF ANSIENABLE = TRUE) |
|||
; |
|||
BOOTTYPE .EQU BT_MENU ; BT_MENU (WAIT FOR KEYPRESS), BT_AUTO (BOOT_DEFAULT AFTER BOOT_TIMEOUT SECS) |
|||
BOOT_TIMEOUT .EQU 20 ; APPROX TIMEOUT IN SECONDS FOR AUTOBOOT, 0 FOR IMMEDIATE |
|||
BOOT_DEFAULT .EQU 'R' ; SELECTION TO INVOKE AT TIMEOUT |
|||
; |
|||
|
|||
BAUDRATE .EQU 38400 ; IN BPS: 1200, 9600, 38400, ..., 115200 |
|||
|
|||
TERMTYPE .EQU TERM_ANSI ; TERM_TTY=0, TERM_ANSI=1, TERM_WYSE=2 |
|||
; |
|||
; Z180_CLKDIV .EQU 1 ; 0=XTAL/2, 1=XTAL/1 |
|||
;; Z180_MEMWAIT .EQU 0 ; MEMORY WAIT STATES TO INSERT (0-3) |
|||
;; Z180_IOWAIT .EQU 3 ; IO WAIT STATES TO INSERT (0-3) |
|||
;; Z180_CNTLB0 .EQU 20H ; SERIAL PORT 0 DIV, SEE Z180 CLOCKING DOCUMENT |
|||
;; Z180_CNTLB1 .EQU 20H ; SERIAL PORT 1 DIV, SEE Z180 CLOCKING DOCUMENT |
|||
|
|||
;;;;;;;;;;;;;;;;;;;;;;;; |
|||
; EOF - CONFG_S100.ASM ; |
|||
;;;;;;;;;;;;;;;;;;;;;;;; |
|||
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
File diff suppressed because it is too large
@ -1,6 +0,0 @@ |
|||
; ~/RomWBW/branches/s100/Source/s100cpu.inc 1/17/2013 dwg - |
|||
|
|||
; S100COMPUTERS.COM Z80 Master CPU Board Schema |
|||
|
|||
#DEFINE IC_Z80 |
|||
|
|||
@ -1,10 +0,0 @@ |
|||
; ~/RomWBW/branches/s100/Source/s100dide.inc 1/17/2013 dwg - |
|||
|
|||
; S100COMPUTERS.COM Dual IDE Board Schema |
|||
|
|||
;#DEFINE IC_SCC_8530 |
|||
|
|||
;#DEFINE IC_PPI_8255 |
|||
|
|||
|
|||
|
|||
@ -1,38 +0,0 @@ |
|||
; ~/RomWBW/branches/s100/Source/s100iob.inc 1/17/2013 dwg - |
|||
|
|||
; S100COMPUTERS.COM Input Output Board Schema |
|||
|
|||
#DEFINE IC_SCC_8530 |
|||
|
|||
#DEFINE IC_PPI_8255 |
|||
|
|||
; |
|||
;================================================================== |
|||
; WBW: STUFF BELOW IS TEMPORARY TO ALLOW S100 TO BUILD WITHOUT ERROR |
|||
;================================================================== |
|||
; |
|||
; PPI 82C55 I/O IS DECODED TO PORT 60-67 |
|||
; |
|||
PPIBASE .EQU 60H |
|||
PPIA .EQU PPIBASE + 0 ; PORT A |
|||
PPIB .EQU PPIBASE + 1 ; PORT B |
|||
PPIC .EQU PPIBASE + 2 ; PORT C |
|||
PPIX .EQU PPIBASE + 3 ; PPI CONTROL PORT |
|||
; |
|||
; 16C550 SERIAL LINE UART |
|||
; |
|||
SIO_BASE .EQU 68H |
|||
SIO_RBR .EQU SIO_BASE + 0 ; DLAB=0: RCVR BUFFER REG (READ ONLY) |
|||
SIO_THR .EQU SIO_BASE + 0 ; DLAB=0: XMIT HOLDING REG (WRITE ONLY) |
|||
SIO_IER .EQU SIO_BASE + 1 ; DLAB=0: INT ENABLE REG |
|||
SIO_IIR .EQU SIO_BASE + 2 ; INT IDENT REGISTER (READ ONLY) |
|||
SIO_FCR .EQU SIO_BASE + 2 ; FIFO CONTROL REG (WRITE ONLY) |
|||
SIO_LCR .EQU SIO_BASE + 3 ; LINE CONTROL REG |
|||
SIO_MCR .EQU SIO_BASE + 4 ; MODEM CONTROL REG |
|||
SIO_LSR .EQU SIO_BASE + 5 ; LINE STATUS REG |
|||
SIO_MSR .EQU SIO_BASE + 6 ; MODEM STATUS REG |
|||
SIO_SCR .EQU SIO_BASE + 7 ; SCRATCH REGISTER |
|||
SIO_DLL .EQU SIO_BASE + 0 ; DLAB=1: DIVISOR LATCH (LS) |
|||
SIO_DLM .EQU SIO_BASE + 1 ; DLAB=1: DIVISOR LATCH (MS) |
|||
; |
|||
;================================================================== |
|||
@ -1,10 +0,0 @@ |
|||
; ~/RomWBW/branches/s100/Source/s100rrf.inc 1/17/2013 dwg - |
|||
|
|||
; S100COMPUTERS.COM Ram Rom Flash Board Schema |
|||
|
|||
;#DEFINE IC_SCC_8530 |
|||
|
|||
;#DEFINE IC_PPI_8255 |
|||
|
|||
|
|||
|
|||
@ -1,37 +0,0 @@ |
|||
; std-s100.inc 1/19/2013 dwg - |
|||
; |
|||
;=============================================================================== |
|||
; |
|||
; CHARACTER DEVICES |
|||
; |
|||
CIODEV_UART .EQU $00 |
|||
CIODEV_N8V .EQU $50 |
|||
CIODEV_PRPCON .EQU $60 |
|||
CIODEV_PPPCON .EQU $70 |
|||
CIODEV_CRT .EQU $D0 |
|||
CIODEV_BAT .EQU $E0 |
|||
CIODEV_NUL .EQU $F0 |
|||
; |
|||
; DISK DEVICES (ONLY FIRST NIBBLE RELEVANT, SECOND NIBBLE RESERVED FOR UNIT) |
|||
; |
|||
DIODEV_MD .EQU $00 |
|||
DIODEV_FD .EQU $10 |
|||
DIODEV_IDE .EQU $20 |
|||
DIODEV_ATAPI .EQU $30 |
|||
DIODEV_PPIDE .EQU $40 |
|||
DIODEV_SD .EQU $50 |
|||
DIODEV_PRPSD .EQU $60 |
|||
DIODEV_PPPSD .EQU $70 |
|||
DIODEV_HDSK .EQU $80 |
|||
; |
|||
; VDA DEVICES (VIDEO DISPLAY ADAPTER) |
|||
; |
|||
VDADEV_NONE .EQU $00 ; NO VDA DEVICE |
|||
VDADEV_VDU .EQU $10 ; ECB VDU - 6545 CHIP |
|||
VDADEV_CVDU .EQU $20 ; ECB COLOR VDU - 8563 CHIP (NOT IMP) |
|||
VDADEV_UPD7220 .EQU $30 ; ECB uP7220 (NOT IMPLEMENTED) |
|||
VDADEV_N8V .EQU $40 ; N8 ONBOARD VDA SUBSYSTEM |
|||
|
|||
;;;;;;;;;;;;;;;;;;;;;; |
|||
; eof - std-s100.inc ; |
|||
;;;;;;;;;;;;;;;;;;;;;; |
|||
@ -1,467 +1,385 @@ |
|||
# Makefile 1/31/2013 dwg -
|
|||
|
|||
# RomWBW/branches/s100/XSource/Makefile 1/19/2013 dgw -
|
|||
# This makefile is a preliminary build script for the new std.asm schema.
|
|||
# It currently builds the zeta and n8_2312 platforms and work on the
|
|||
# n8vem platform is in progress but not working yet.
|
|||
|
|||
# RomWBW/branches/dwg/XSource/Makefile 1/16/2013 dwg - validate build on Linux
|
|||
# RomWBW/branches/dwg/XSource/Makefile 11/09/2012 dwg - add copy rule for n8chars.inc
|
|||
# RomWBW/branches/dwg/XSource/Makefile 10/24/2012 dwg -
|
|||
#
|
|||
# GCC based makefile
|
|||
#
|
|||
# 09/28/2012 2.2 dwg - updated for Mac OS X 10.8.2 Mountain Lion
|
|||
#
|
|||
# 06/18/2012 2.0 dgg - updated for v2.0
|
|||
#
|
|||
# 02/22/2012 1.5 dgg - modified for assembly under Linux
|
|||
#
|
|||
# 01/11/2011 1.4 wbw - added support for ZSDOS/ZDDOS/ZCPR
|
|||
#
|
|||
# 12/22/2011 1.3 wbw - removed all built-in config stuff, operation is now entirely
|
|||
# dependent on variables CONFIG, ROMSIZE, and CPU
|
|||
#
|
|||
# 12/02/2011 1.3 wbw - replaced makever functionality with built-in makefile stuff
|
|||
#
|
|||
# 11/29/2011 1.3 dwg - uses makever to generate stdincl.inc from the version.hpp file
|
|||
#
|
|||
# 11/19/2011 1.3 dwg - added n8vem_vdu to "usage" and "all" rules
|
|||
# enhanced clean to get files in $(OUTDIR)
|
|||
# added custom to "all" rule
|
|||
|
|||
#
|
|||
# The operation of this makefile is entirely dependent on the setting
|
|||
# of three variables: CONFIG, ROMSIZE, and CPU:
|
|||
#
|
|||
# CONFIG determines which configuration to build which means that
|
|||
# it will determine the config_xxx.asm config settings file to
|
|||
# include as well as the output file names. So, for example,
|
|||
# if CONFIG is "n8vem", the config_n8vem.asm file will be used
|
|||
# for BIOS configuration settings and the output files will be
|
|||
# n8vem.rom, n8vem.sys, and n8vem.com.
|
|||
#
|
|||
# ROMSIZE specifies the size of the ROM image to be produced and
|
|||
# currently must be either "1024" for a 1MB ROM or "512" for a
|
|||
# 512KB ROM.
|
|||
#
|
|||
# CPU specifies the instruction set to be used in assembly and
|
|||
# must be either "80" for Z80 or "180" for Z180. Currently,
|
|||
# you should use 180 for N8 ROMs and 80 for everything else.
|
|||
#
|
|||
# SYS specifies the system variant to build in. CPM will
|
|||
# build traditional CP/M. ZSYS will build ZSystem which
|
|||
# currently means ZSDOS 1.2 & ZCPR 1.0
|
|||
#
|
|||
# ROMNAME names the output file. It defaults to
|
|||
# CONFIG. The output of the build will be:
|
|||
# <ROMNAME>.rom, <ROMNAME>.sys, and <ROMNAME>.com.
|
|||
#
|
|||
# These variables can be passed into the makefile by the command
|
|||
# line, hardcoded in this file, or set as environment variables
|
|||
# in the OS. To use a command line, use the following format:
|
|||
#
|
|||
# make CONFIG=<config> ROMSIZE=<romsize> CPU=<cpu> SYS=<sys> ROMNAME=<romname>
|
|||
#
|
|||
# An example of this is:
|
|||
#
|
|||
# make CONFIG=n8vem ROMSIZE=512 CPU=80 SYS=CPM ROMNAME=n8vem
|
|||
#
|
|||
# Alternatively, you can specify the variables by hardcoding them
|
|||
# in this file. To do so, uncomment the five lines after these
|
|||
# comments and change the values as desired.
|
|||
# If the variables are specified this way, you would then invoke
|
|||
# the make by simply using "make"
|
|||
#
|
|||
# If you want to set them as environment variables, you can
|
|||
# do this with commands like the following at an OS command
|
|||
# prompt or in a batch file:
|
|||
#
|
|||
# SET CONFIG=zeta
|
|||
# SET ROMSIZE=512
|
|||
# SET CPU=80
|
|||
# SET SYS=CPM
|
|||
# SET ROMNAME=zeta
|
|||
#
|
|||
# Note: use "make clean" to delete temporary and output files
|
|||
#
|
|||
# A good idea is to do a clean with every build and this can be
|
|||
# accomplished on one command line doing something like this:
|
|||
#
|
|||
# make clean all CONFIG=n8vem ROMSIZE=512 CPU=80 SYS=CPM ROMNAME=n8vem
|
|||
#
|
|||
# or, if you are using hard coded variables above:
|
|||
#
|
|||
# make clean all
|
|||
#
|
|||
# Uncomment and update values below to hardcode settings:
|
|||
#
|
|||
|
|||
#CONFIG := zeta
|
|||
#ROMSIZE := 512
|
|||
#CPU := 180
|
|||
#SYS := CPM
|
|||
#ROMNAME := zeta
|
|||
|
|||
#CONFIG := n8_2312
|
|||
#ROMSIZE := 512
|
|||
#CPU := 180
|
|||
#SYS := CPM
|
|||
#ROMNAME := n8_2312
|
|||
|
|||
#CONFIG := n8vem
|
|||
#ROMSIZE := 512
|
|||
#CPU := 180
|
|||
#SYS := CPM
|
|||
#ROMNAME := n8vem
|
|||
|
|||
CONFIG := s100_std |
|||
ROMSIZE := 512 |
|||
CPU := 80 |
|||
SYS := CPM |
|||
ROMNAME := s100 |
|||
CPUROM := master-luke |
|||
|
|||
ifndef ROMNAME |
|||
ROMNAME := $(CONFIG) |
|||
endif |
|||
|
|||
CPMCP := bin/cpmcp |
|||
CVT := bin/CVT2MAC |
|||
SRC := ../Source/ |
|||
|
|||
ROMDSKFILES := ../RomDsk/$(SYS)_$(ROMSIZE)KB/*.* ../RomDsk/cfg_$(CONFIG)/*.* ../Apps/core/*.* |
|||
|
|||
ifeq "$(SYS)" "CPM" |
|||
DOSBIN := bdosb01.bin |
|||
CPBIN := ccpb03.bin |
|||
else |
|||
DOSBIN := zsdos.bin |
|||
CPBIN := zcprw.bin |
|||
endif |
|||
|
|||
OUTDIR := ../Output |
|||
|
|||
TASM := bin/TASM |
|||
TASMTABS := bin |
|||
export TASMTABS |
|||
|
|||
ASMOPT80 := -t$(CPU) -g3 |
|||
ASMOPT85 := -t85 -g3 |
|||
|
|||
ASM80 := $(TASM) $(ASMOPT80) |
|||
ASM85 := $(TASM) $(ASMOPT85) |
|||
ASMIMG := $(TASM) $(ASMOPT80) -b -fE5 |
|||
|
|||
NULL := |
|||
SPACE := ${NULL} ${NULL} |
|||
|
|||
|
|||
%.bin: %.asm |
|||
$(ASM80) $< $@ |
|||
|
|||
%.com: %.asm |
|||
$(ASM80) $< $@ |
|||
|
|||
%.img: %.asm |
|||
$(ASMIMG) $< $@ |
|||
|
|||
%.exe: %.cpp |
|||
$(CC) $< -o $@ |
|||
|
|||
ifneq ($(MAKECMDGOALS),clean) |
|||
ifeq "$(and $(CONFIG), $(ROMSIZE), $(CPU), $(SYS), $(ROMNAME))" "" |
|||
$(error Usage: make CONFIG=<config> ROMSIZE=[512|1024] CPU=[80|180] SYS=[CPM|ZSYS] ROMNAME=<romname>) |
|||
endif |
|||
endif |
|||
|
|||
# The STDS macro names all the sub-includes so they all can be copied
|
|||
# in from the Source folder. $(STDS) is the first dependency of the "all"
|
|||
# target, therefore assuring that these files are here in time for their
|
|||
# use in any assembly that includes the top level file, "std.asm".
|
|||
# STDS = std-n8.inc std-n8vem.inc std-s100.inc std-s2i.inc std-zeta.inc
|
|||
STDS = std-s100.inc std-n8vem.inc |
|||
CONDIT = $(OUTDIR)/$(CPUROM).rom |
|||
|
|||
all: $(STDS) tasm80.tab tasm85.tab $(OUTDIR)/$(ROMNAME).rom $(OUTDIR)/$(ROMNAME).sys $(OUTDIR)/$(ROMNAME).com $(CONDIT) |
|||
rm -f *.asm |
|||
rm -f *.bin |
|||
rm -f *.inc *.tab *.tmp |
|||
rm -f diskdefs *.exp |
|||
|
|||
tasm80.tab: bin/TASM80.TAB |
|||
cp bin/TASM80.TAB tasm80.tab |
|||
|
|||
tasm85.tab: bin/TASM85.TAB |
|||
cp bin/TASM85.TAB tasm85.tab |
|||
|
|||
|
|||
build.inc: |
|||
/bin/echo ';' >$@ |
|||
/bin/echo -n '; RomWBW Configured for '$(CONFIG)' ' >>$@ |
|||
date >> $@ |
|||
/bin/echo ; >>$@ |
|||
/bin/echo -n '#DEFINE TIMESTAMP "' >>$@ |
|||
date '+%Y %m %d %H%M"' >>$@ |
|||
/bin/echo ; >>$@ |
|||
/bin/echo '#DEFINE VARIANT "WBW-$(USERNAME)"' >>$@ |
|||
/bin/echo ; >>$@ |
|||
/bin/echo ROMSIZE .EQU $(ROMSIZE) >>$@ |
|||
/bin/echo ; >>$@ |
|||
/bin/echo '#INCLUDE "config_'$(CONFIG)'.asm"' >>$@ |
|||
/bin/echo ; >>$@ |
|||
|
|||
# 12/31/2012 dwg - added xio.asm as dependency
|
|||
bootrom.bin : bootrom.asm std.asm build.inc ver.inc memmgr.asm config_$(CONFIG).asm xio.asm |
|||
$(TASM) $(ASMOPT80) $< $@ |
|||
|
|||
bootapp.bin: bootapp.asm std.asm build.inc ver.inc |
|||
$(TASM) $(ASMOPT80) $< $@ |
|||
|
|||
#$(OUTDIR)/$(CPUROM).rom: $(CPUROM).asm std.asm build.inc config_$(CONFIG).asm
|
|||
# cp config_$(CONFIG).asm config.asm
|
|||
# $(ASMIMG) $(CPUROM).asm $(OUTDIR)/$(CPUROM).rom
|
|||
|
|||
$(OUTDIR)/$(CPUROM).rom: $(CPUROM).asm |
|||
$(ASMIMG) $< $@ |
|||
|
|||
pgzero.bin: pgzero.asm std.asm build.inc ver.inc |
|||
$(TASM) $(ASMOPT80) $< $@ |
|||
|
|||
zcprw.bin: zcprw.asm zcpr.asm |
|||
$(TASM) $(ASMOPT85) $< $@ |
|||
|
|||
zsdos.bin: zsdos.asm zsdos.lib zsdos-gp.z80 |
|||
$(TASM) $(ASMOPT80) $< $@ |
|||
|
|||
cbios.bin: cbios.asm fd_data.asm ide_data.asm ppide_data.asm sd_data.asm prp_data.asm ppp_data.asm uart.asm vdu.asm std.asm ver.inc build.inc infolist.inc |
|||
$(TASM) $(ASMOPT80) -dBLD_SYS=SYS_$(SYS) $< $@ |
|||
|
|||
dbgmon.bin: dbgmon.asm std.asm ver.inc build.inc |
|||
|
|||
syscfg.bin: syscfg.asm std.asm build.inc ver.inc |
|||
|
|||
os.bin: $(CPBIN) $(DOSBIN) cbios.bin |
|||
cat $(CPBIN) $(DOSBIN) cbios.bin >>$@ |
|||
|
|||
rom0.bin: pgzero.bin bootrom.bin syscfg.bin loader.bin romfill.bin dbgmon.bin os.bin hbfill.bin |
|||
cat pgzero.bin bootrom.bin syscfg.bin loader.bin romfill.bin dbgmon.bin os.bin hbfill.bin >>$@ |
|||
|
|||
# fixed 1/16/20113 dwg - added hbios.bin to end of cat list
|
|||
rom1.bin: pgzero.bin bootrom.bin syscfg.bin loader.bin hbios.bin |
|||
cat pgzero.bin bootrom.bin syscfg.bin loader.bin hbios.bin >>$@ |
|||
|
|||
$(OUTDIR)/$(ROMNAME).rom: rom0.bin rom1.bin $(ROMDISKFILES) $(OUTDIR)/$(ROMNAME).sys diskdefs |
|||
cp $(SRC)blank$(ROMSIZE)KB.dat RomDisk.tmp |
|||
$(CPMCP) -f rom$(ROMSIZE)KB RomDisk.tmp $(ROMDSKFILES) 0: |
|||
$(CPMCP) -f rom$(ROMSIZE)KB RomDisk.tmp ../Output/$(ROMNAME).sys 0:$(SYS).sys |
|||
cat rom0.bin rom1.bin RomDisk.tmp >>$@ |
|||
|
|||
$(OUTDIR)/$(ROMNAME).com: bootapp.bin syscfg.bin loader.bin hbios.bin dbgmon.bin os.bin |
|||
cat bootapp.bin syscfg.bin loader.bin hbios.bin dbgmon.bin os.bin >>$@ |
|||
|
|||
$(OUTDIR)/$(ROMNAME).sys: prefix.bin os.bin |
|||
cat prefix.bin os.bin >>$@ |
|||
|
|||
$(OUTDIR)/$(CPUROM).bin: $(CPUROM).asm std.asm btromwbw.inc |
|||
$(ASMIMG) $(CPUROM).asm $@ |
|||
|
|||
std.asm: $(SRC)std.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ansi.asm: $(SRC)ansi.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
bdosb01.asm: $(SRC)bdosb01.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
hbios.asm: $(SRC)hbios.asm kbd.asm fd.asm ppide.asm n8v.asm n8chars.inc ppk.asm sd.asm tty.asm ansi.asm |
|||
cp $(SRC)hbios.asm $@ |
|||
$(CVT) $@ |
|||
|
|||
bootapp.asm: $(SRC)bootapp.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
bootrom.asm: $(SRC)bootrom.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
cbios.asm: $(SRC)cbios.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ccpb03.asm: $(SRC)ccpb03.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
cnfgdata.inc: $(SRC)cnfgdata.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
config_$(CONFIG).asm: $(SRC)config_$(CONFIG).asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
dbgmon.asm: $(SRC)dbgmon.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
diskdefs: $(SRC)diskdefs |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
fd.asm: $(SRC)fd.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
fd_data.asm: $(SRC)fd_data.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
hbfill.asm: $(SRC)hbfill.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ide_data.asm: $(SRC)ide_data.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
infolist.inc: $(SRC)infolist.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
kbd.asm: $(SRC)kbd.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
loader.asm: $(SRC)loader.asm util.asm |
|||
cp $(SRC)loader.asm $@ |
|||
$(CVT) $@ |
|||
|
|||
$(CPUROM).asm: $(SRC)/$(CPUROM).asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
btromwbw.inc: $(SRC)/btromwbw.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
memmgr.asm: $(SRC)memmgr.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
n8chars.inc: $(SRC)n8chars.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
n8v.asm: $(SRC)n8v.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
pgzero.asm: $(SRC)pgzero.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ppide.asm: $(SRC)ppide.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ppide_data.asm: $(SRC)ppide_data.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ppk.asm: $(SRC)ppk.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ppp_data.asm: $(SRC)ppp_data.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
prefix.asm: $(SRC)prefix.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
prp_data.asm: $(SRC)prp_data.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
romfill.asm: $(SRC)romfill.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
s100-i3.asm: $(SRC)s100-i3.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
sd.asm: $(SRC)sd.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
sd_data.asm: $(SRC)sd_data.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
# By adding all the sub-includes as dependencies for std.asm, this assures that
|
|||
# whichever one we are using will be present during the assembly of any modules
|
|||
# that include std.asm.
|
|||
std.asm: $(SRC)std.asm $(STDS) |
|||
cp $(SRC)std.asm $@ |
|||
$(CVT) $@ |
|||
|
|||
std-n8.inc: $(SRC)std-n8.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
std-n8vem.inc: $(SRC)std-n8vem.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
std-s100.inc: $(SRC)std-s100.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
std-s2i.inc: $(SRC)std-s2i.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
std-zeta.inc: $(SRC)std-zeta.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
syscfg.asm: $(SRC)syscfg.asm config_$(CONFIG).asm cnfgdata.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
tty.asm: $(SRC)tty.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
uart.asm: $(SRC)uart.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
util.asm: $(SRC)util.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
vdu.asm: $(SRC)vdu.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ver.inc: $(SRC)ver.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
xio.asm: $(SRC)xio.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
clean: |
|||
rm -f *.tab *.TAB *.inc *.asm *.bin *.com *.img *.rom *.lst *.exp *.tmp |
|||
rm -f build.inc diskdefs *.inc |
|||
rm -f $(OUTDIR)/*.* |
|||
# Makefile 1/31/2013 dwg -
|
|||
|
|||
# RomWBW/branches/s100/XSource/Makefile 1/19/2013 dgw -
|
|||
# This makefile is a preliminary build script for the new std.asm schema.
|
|||
# It currently builds the zeta and n8_2312 platforms and work on the
|
|||
# n8vem platform is in progress but not working yet.
|
|||
|
|||
# RomWBW/branches/dwg/XSource/Makefile 1/16/2013 dwg - validate build on Linux
|
|||
# RomWBW/branches/dwg/XSource/Makefile 11/09/2012 dwg - add copy rule for n8chars.inc
|
|||
# RomWBW/branches/dwg/XSource/Makefile 10/24/2012 dwg -
|
|||
#
|
|||
# GCC based makefile
|
|||
#
|
|||
# 09/28/2012 2.2 dwg - updated for Mac OS X 10.8.2 Mountain Lion
|
|||
#
|
|||
# 06/18/2012 2.0 dgg - updated for v2.0
|
|||
#
|
|||
# 02/22/2012 1.5 dgg - modified for assembly under Linux
|
|||
#
|
|||
# 01/11/2011 1.4 wbw - added support for ZSDOS/ZDDOS/ZCPR
|
|||
#
|
|||
# 12/22/2011 1.3 wbw - removed all built-in config stuff, operation is now entirely
|
|||
# dependent on variables CONFIG, ROMSIZE, and CPU
|
|||
#
|
|||
# 12/02/2011 1.3 wbw - replaced makever functionality with built-in makefile stuff
|
|||
#
|
|||
# 11/29/2011 1.3 dwg - uses makever to generate stdincl.inc from the version.hpp file
|
|||
#
|
|||
# 11/19/2011 1.3 dwg - added n8vem_vdu to "usage" and "all" rules
|
|||
# enhanced clean to get files in $(OUTDIR)
|
|||
# added custom to "all" rule
|
|||
|
|||
#
|
|||
# The operation of this makefile is entirely dependent on the setting
|
|||
# of three variables: CONFIG, ROMSIZE, and CPU:
|
|||
#
|
|||
# CONFIG determines which configuration to build which means that
|
|||
# it will determine the config_xxx.asm config settings file to
|
|||
# include as well as the output file names. So, for example,
|
|||
# if CONFIG is "n8vem", the config_n8vem.asm file will be used
|
|||
# for BIOS configuration settings and the output files will be
|
|||
# n8vem.rom, n8vem.sys, and n8vem.com.
|
|||
#
|
|||
# ROMSIZE specifies the size of the ROM image to be produced and
|
|||
# currently must be either "1024" for a 1MB ROM or "512" for a
|
|||
# 512KB ROM.
|
|||
#
|
|||
# CPU specifies the instruction set to be used in assembly and
|
|||
# must be either "80" for Z80 or "180" for Z180. Currently,
|
|||
# you should use 180 for N8 ROMs and 80 for everything else.
|
|||
#
|
|||
# SYS specifies the system variant to build in. CPM will
|
|||
# build traditional CP/M. ZSYS will build ZSystem which
|
|||
# currently means ZSDOS 1.2 & ZCPR 1.0
|
|||
#
|
|||
# ROMNAME names the output file. It defaults to
|
|||
# CONFIG. The output of the build will be:
|
|||
# <ROMNAME>.rom, <ROMNAME>.sys, and <ROMNAME>.com.
|
|||
#
|
|||
# These variables can be passed into the makefile by the command
|
|||
# line, hardcoded in this file, or set as environment variables
|
|||
# in the OS. To use a command line, use the following format:
|
|||
#
|
|||
# make CONFIG=<config> ROMSIZE=<romsize> CPU=<cpu> SYS=<sys> ROMNAME=<romname>
|
|||
#
|
|||
# An example of this is:
|
|||
#
|
|||
# make CONFIG=n8vem ROMSIZE=512 CPU=80 SYS=CPM ROMNAME=n8vem
|
|||
#
|
|||
# Alternatively, you can specify the variables by hardcoding them
|
|||
# in this file. To do so, uncomment the five lines after these
|
|||
# comments and change the values as desired.
|
|||
# If the variables are specified this way, you would then invoke
|
|||
# the make by simply using "make"
|
|||
#
|
|||
# If you want to set them as environment variables, you can
|
|||
# do this with commands like the following at an OS command
|
|||
# prompt or in a batch file:
|
|||
#
|
|||
# SET CONFIG=zeta
|
|||
# SET ROMSIZE=512
|
|||
# SET CPU=80
|
|||
# SET SYS=CPM
|
|||
# SET ROMNAME=zeta
|
|||
#
|
|||
# Note: use "make clean" to delete temporary and output files
|
|||
#
|
|||
# A good idea is to do a clean with every build and this can be
|
|||
# accomplished on one command line doing something like this:
|
|||
#
|
|||
# make clean all CONFIG=n8vem ROMSIZE=512 CPU=80 SYS=CPM ROMNAME=n8vem
|
|||
#
|
|||
# or, if you are using hard coded variables above:
|
|||
#
|
|||
# make clean all
|
|||
#
|
|||
# Uncomment and update values below to hardcode settings:
|
|||
#
|
|||
|
|||
#CONFIG := zeta
|
|||
#ROMSIZE := 512
|
|||
#CPU := 180
|
|||
#SYS := CPM
|
|||
#ROMNAME := zeta
|
|||
|
|||
CONFIG := n8_2312 |
|||
ROMSIZE := 512 |
|||
CPU := 180 |
|||
SYS := CPM |
|||
ROMNAME := n8_2312 |
|||
|
|||
#CONFIG := n8vem
|
|||
#ROMSIZE := 512
|
|||
#CPU := 180
|
|||
#SYS := CPM
|
|||
#ROMNAME := n8vem
|
|||
|
|||
tasm80.tab: bin/TASM80.TAB |
|||
cp bin/TASM80.TAB tasm80.tab |
|||
|
|||
tasm85.tab: bin/TASM85.TAB |
|||
cp bin/TASM85.TAB tasm85.tab |
|||
|
|||
|
|||
build.inc: |
|||
/bin/echo ';' >$@ |
|||
/bin/echo -n '; RomWBW Configured for '$(CONFIG)' ' >>$@ |
|||
date >> $@ |
|||
/bin/echo ; >>$@ |
|||
/bin/echo -n '#DEFINE TIMESTAMP "' >>$@ |
|||
date '+%Y %m %d %H%M"' >>$@ |
|||
/bin/echo ; >>$@ |
|||
/bin/echo '#DEFINE VARIANT "WBW-$(USERNAME)"' >>$@ |
|||
/bin/echo ; >>$@ |
|||
/bin/echo ROMSIZE .EQU $(ROMSIZE) >>$@ |
|||
/bin/echo ; >>$@ |
|||
/bin/echo '#INCLUDE "config_'$(CONFIG)'.asm"' >>$@ |
|||
/bin/echo ; >>$@ |
|||
|
|||
# 12/31/2012 dwg - added xio.asm as dependency
|
|||
bootrom.bin : bootrom.asm std.asm build.inc ver.inc memmgr.asm config_$(CONFIG).asm xio.asm |
|||
$(TASM) $(ASMOPT80) $< $@ |
|||
|
|||
bootapp.bin: bootapp.asm std.asm build.inc ver.inc |
|||
$(TASM) $(ASMOPT80) $< $@ |
|||
|
|||
#$(OUTDIR)/$(CPUROM).rom: $(CPUROM).asm std.asm build.inc config_$(CONFIG).asm
|
|||
# cp config_$(CONFIG).asm config.asm
|
|||
# $(ASMIMG) $(CPUROM).asm $(OUTDIR)/$(CPUROM).rom
|
|||
|
|||
$(OUTDIR)/$(CPUROM).rom: $(CPUROM).asm |
|||
$(ASMIMG) $< $@ |
|||
|
|||
pgzero.bin: pgzero.asm std.asm build.inc ver.inc |
|||
$(TASM) $(ASMOPT80) $< $@ |
|||
|
|||
zcprw.bin: zcprw.asm zcpr.asm |
|||
$(TASM) $(ASMOPT85) $< $@ |
|||
|
|||
zsdos.bin: zsdos.asm zsdos.lib zsdos-gp.z80 |
|||
$(TASM) $(ASMOPT80) $< $@ |
|||
|
|||
cbios.bin: cbios.asm fd_data.asm ide_data.asm ppide_data.asm sd_data.asm prp_data.asm ppp_data.asm uart.asm vdu.asm std.asm ver.inc build.inc infolist.inc |
|||
$(TASM) $(ASMOPT80) -dBLD_SYS=SYS_$(SYS) $< $@ |
|||
|
|||
dbgmon.bin: dbgmon.asm std.asm ver.inc build.inc |
|||
|
|||
syscfg.bin: syscfg.asm std.asm build.inc ver.inc |
|||
|
|||
os.bin: $(CPBIN) $(DOSBIN) cbios.bin |
|||
cat $(CPBIN) $(DOSBIN) cbios.bin >>$@ |
|||
|
|||
rom0.bin: pgzero.bin bootrom.bin syscfg.bin loader.bin romfill.bin dbgmon.bin os.bin hbfill.bin |
|||
cat pgzero.bin bootrom.bin syscfg.bin loader.bin romfill.bin dbgmon.bin os.bin hbfill.bin >>$@ |
|||
|
|||
# fixed 1/16/20113 dwg - added hbios.bin to end of cat list
|
|||
rom1.bin: pgzero.bin bootrom.bin syscfg.bin loader.bin hbios.bin |
|||
cat pgzero.bin bootrom.bin syscfg.bin loader.bin hbios.bin >>$@ |
|||
|
|||
$(OUTDIR)/$(ROMNAME).rom: rom0.bin rom1.bin $(ROMDISKFILES) $(OUTDIR)/$(ROMNAME).sys diskdefs |
|||
cp $(SRC)blank$(ROMSIZE)KB.dat RomDisk.tmp |
|||
$(CPMCP) -f rom$(ROMSIZE)KB RomDisk.tmp $(ROMDSKFILES) 0: |
|||
$(CPMCP) -f rom$(ROMSIZE)KB RomDisk.tmp ../Output/$(ROMNAME).sys 0:$(SYS).sys |
|||
cat rom0.bin rom1.bin RomDisk.tmp >>$@ |
|||
|
|||
$(OUTDIR)/$(ROMNAME).com: bootapp.bin syscfg.bin loader.bin hbios.bin dbgmon.bin os.bin |
|||
cat bootapp.bin syscfg.bin loader.bin hbios.bin dbgmon.bin os.bin >>$@ |
|||
|
|||
$(OUTDIR)/$(ROMNAME).sys: prefix.bin os.bin |
|||
cat prefix.bin os.bin >>$@ |
|||
|
|||
$(OUTDIR)/$(CPUROM).bin: $(CPUROM).asm std.asm btromwbw.inc |
|||
$(ASMIMG) $(CPUROM).asm $@ |
|||
|
|||
std.asm: $(SRC)std.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ansi.asm: $(SRC)ansi.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
bdosb01.asm: $(SRC)bdosb01.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
hbios.asm: $(SRC)hbios.asm kbd.asm fd.asm ppide.asm n8v.asm n8chars.inc ppk.asm sd.asm tty.asm ansi.asm |
|||
cp $(SRC)hbios.asm $@ |
|||
$(CVT) $@ |
|||
|
|||
bootapp.asm: $(SRC)bootapp.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
bootrom.asm: $(SRC)bootrom.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
cbios.asm: $(SRC)cbios.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ccpb03.asm: $(SRC)ccpb03.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
cnfgdata.inc: $(SRC)cnfgdata.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
config_$(CONFIG).asm: $(SRC)config_$(CONFIG).asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
dbgmon.asm: $(SRC)dbgmon.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
diskdefs: $(SRC)diskdefs |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
fd.asm: $(SRC)fd.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
fd_data.asm: $(SRC)fd_data.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
hbfill.asm: $(SRC)hbfill.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ide_data.asm: $(SRC)ide_data.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
infolist.inc: $(SRC)infolist.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
kbd.asm: $(SRC)kbd.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
loader.asm: $(SRC)loader.asm util.asm |
|||
cp $(SRC)loader.asm $@ |
|||
$(CVT) $@ |
|||
|
|||
$(CPUROM).asm: $(SRC)/$(CPUROM).asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
btromwbw.inc: $(SRC)/btromwbw.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
memmgr.asm: $(SRC)memmgr.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
n8chars.inc: $(SRC)n8chars.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
n8v.asm: $(SRC)n8v.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
pgzero.asm: $(SRC)pgzero.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ppide.asm: $(SRC)ppide.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ppide_data.asm: $(SRC)ppide_data.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ppk.asm: $(SRC)ppk.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ppp_data.asm: $(SRC)ppp_data.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
prefix.asm: $(SRC)prefix.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
prp_data.asm: $(SRC)prp_data.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
romfill.asm: $(SRC)romfill.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
sd.asm: $(SRC)sd.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
sd_data.asm: $(SRC)sd_data.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
# By adding all the sub-includes as dependencies for std.asm, this assures that
|
|||
# whichever one we are using will be present during the assembly of any modules
|
|||
# that include std.asm.
|
|||
std.asm: $(SRC)std.asm $(STDS) |
|||
cp $(SRC)std.asm $@ |
|||
$(CVT) $@ |
|||
|
|||
std-n8.inc: $(SRC)std-n8.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
std-n8vem.inc: $(SRC)std-n8vem.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
std-s2i.inc: $(SRC)std-s2i.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
std-zeta.inc: $(SRC)std-zeta.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
syscfg.asm: $(SRC)syscfg.asm config_$(CONFIG).asm cnfgdata.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
tty.asm: $(SRC)tty.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
uart.asm: $(SRC)uart.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
util.asm: $(SRC)util.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
vdu.asm: $(SRC)vdu.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
ver.inc: $(SRC)ver.inc |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
xio.asm: $(SRC)xio.asm |
|||
cp $< $@ |
|||
$(CVT) $@ |
|||
|
|||
clean: |
|||
rm -f *.tab *.TAB *.inc *.asm *.bin *.com *.img *.rom *.lst *.exp *.tmp |
|||
rm -f build.inc diskdefs *.inc |
|||
rm -f $(OUTDIR)/*.* |
|||
|
|||
Loading…
Reference in new issue