Skip to content

Commit

Permalink
(feature) Feature builds for more CP/M types
Browse files Browse the repository at this point in the history
Build a library for MSXDOS on MSX which contains the VDP
and AY packages

Do ei/di after we initialise the heap (consistency)
  • Loading branch information
suborb committed Mar 14, 2024
1 parent 7005776 commit ab0ac26
Show file tree
Hide file tree
Showing 13 changed files with 65 additions and 19 deletions.
4 changes: 2 additions & 2 deletions lib/config/cpm.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ SUBTYPE microbee -Cz+cpmdisk -Cz-f -Czmicrobee-ds80 -pragma-define:CONSOLE_C
SUBTYPE micromate -Cz+cpmdisk -Cz-f -Czmicromate -Cz--container=imd -D__MICROMATE__
SUBTYPE montezuma -Cz+cpmdisk -Cz-f -Czmontezuma -Cz--container=imd -ltrs80_cpm -D__TRS80__
SUBTYPE m4cpm3 -Cz+cpmdisk -Cz-f -Czm4cpm3 -Cz--container=imd -ltrs80_cpm -D__TRS80__
SUBTYPE msx -Cz+fat -Cz-f -Czmsxdos -Cz--container -Czdsk -D__MSX__ -pragma-define:__HAVE_TMS99X8=1
SUBTYPE msx -Cz+fat -Cz-f -Czmsxdos -Cz--container -Czdsk -D__MSX__ -pragma-define:__HAVE_TMS99X8=1 -lcpm_msx
SUBTYPE mz80 -Cz+cpmdisk -Cz-f -Czmz80 -Cz--container=dsk -DSHARPMZ -D__SHARPMZ__
SUBTYPE mz800 -Cz+cpmdisk -Cz-f -Czmz800 -Cz--container=dsk -DSHARPMZ -D__SHARPMZ__
SUBTYPE mz2500 -Cz+cpmdisk -Cz-f -Czmz2500cpm -D__MZ2500__
Expand All @@ -106,7 +106,7 @@ SUBTYPE ptcpm -Cz+cpmdisk -Cz-f -Czptcpm -Cz--container=imd -ltrs80_cpm -
SUBTYPE px -Cz+px -lpx8 -Ca-IDESTDIR/lib/target/px8/def -D__PX8__
SUBTYPE pxansi -Cz+px -lpx8 -Ca-IDESTDIR/lib/target/px8/def -pragma-need=ansiterminal -D__CONIO_VT100 -pragma-define:ansicolumns=60 -pragma-define:ansipixels=480 -pragma-define:ansirows=10 -pragma-redirect:ansifont=_font_8x6_px -pragma-define:ansifont_is_packed=0 -D__PX8__
SUBTYPE px4 -Cz+px -lpx4 -Cz--32k -D__PX4__
SUBTYPE px4ansi -Cz+px -lpx4 -Cz--32k -pragma-need=ansiterminal -D__CONIO_VT100 -pragma-define:ansipixels=240 -pragma-define:ansirows=8 -D__PX4__
SUBTYPE px4ansi -Cz+px -lpx4 -Cz--32k -pragma-need=ansiterminal -D__CONIO_VT100 -pragma-define:ansipixels=240 -pragma-define:ansirows=8 -pragma-define:ansicolumns=30 -D__PX4__
SUBTYPE px8 -Cz+px -lpx8 -Ca-IDESTDIR/lib/target/px8/def -D__PX8__
SUBTYPE px8ansi -Cz+px -lpx8 -Ca-IDESTDIR/lib/target/px8/def -pragma-need=ansiterminal -D__CONIO_VT100 -pragma-define:ansicolumns=60 -pragma-define:ansipixels=480 -pragma-define:ansirows=10 -pragma-redirect:ansifont=_font_8x6_px -pragma-define:ansifont_is_packed=0 -D__PX8__
SUBTYPE qc10 -Cz+cpmdisk -Cz-f -Czqc10 -D__QC10__ -D__QX10__
Expand Down
2 changes: 1 addition & 1 deletion lib/target/coleco/classic/rom.asm
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ IF CLIB_DEFAULT_SCREEN_MODE != -1
call vdp_set_mode
ENDIF
im 1
INCLUDE "crt/classic/crt_init_eidi.inc"

INCLUDE "crt/classic/crt_init_heap.inc"
INCLUDE "crt/classic/crt_init_eidi.inc"

call _main
__Exit:
Expand Down
2 changes: 1 addition & 1 deletion lib/target/cpc/classic/cpc_crt0.asm
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ ENDIF
; enable process exx set
; install interrupt interposer
call cpc_enable_process_exx_set
INCLUDE "crt/classic/crt_init_eidi.inc"

INCLUDE "crt/classic/crt_init_heap.inc"
INCLUDE "crt/classic/crt_init_eidi.inc"

IF DEFINED_CLIB_DEFAULT_SCREEN_MODE
ld a,CLIB_DEFAULT_SCREEN_MODE
Expand Down
1 change: 1 addition & 0 deletions lib/target/embedded/classic/embedded_crt0.asm
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ start:
INCLUDE "crt/classic/crt_init_atexit.inc"


INCLUDE "crt/classic/crt_init_heap.inc"
INCLUDE "crt/classic/crt_init_eidi.inc"
; Entry to the user code
call _main
Expand Down
2 changes: 1 addition & 1 deletion lib/target/enterprise/classic/enterprise_crt0.asm
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ ENDIF
call crt0_init
INCLUDE "crt/classic/crt_init_atexit.inc"

INCLUDE "crt/classic/crt_init_eidi.inc"
INCLUDE "crt/classic/crt_init_heap.inc"
INCLUDE "crt/classic/crt_init_eidi.inc"

call _main
Expand Down
2 changes: 1 addition & 1 deletion lib/target/gl/classic/gl_crt0.asm
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ start:
INCLUDE "crt/classic/crt_init_sp.inc"
call crt0_init
INCLUDE "crt/classic/crt_init_atexit.inc"
INCLUDE "crt/classic/crt_init_eidi.inc"
call asm_lcd_init

INCLUDE "crt/classic/crt_init_heap.inc"
INCLUDE "crt/classic/crt_init_eidi.inc"

call _main
__Exit:
Expand Down
2 changes: 1 addition & 1 deletion lib/target/m5/classic/rom.asm
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ IF CLIB_DEFAULT_SCREEN_MODE != -1
ld hl,CLIB_DEFAULT_SCREEN_MODE
call vdp_set_mode
ENDIF
INCLUDE "crt/classic/crt_init_eidi.inc"

INCLUDE "crt/classic/crt_init_heap.inc"
INCLUDE "crt/classic/crt_init_eidi.inc"


call _main ; Call user program
Expand Down
2 changes: 1 addition & 1 deletion lib/target/pv1000/classic/pv1000_crt0.asm
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ program:
call crt0_init
INCLUDE "crt/classic/crt_init_atexit.inc"
im 1
INCLUDE "crt/classic/crt_init_heap.inc"
INCLUDE "crt/classic/crt_init_eidi.inc"

INCLUDE "crt/classic/crt_init_heap.inc"
call _main
__Exit:
call crt0_exit
Expand Down
2 changes: 1 addition & 1 deletion lib/target/z80tvgame/classic/z80tvgame_crt0.asm
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ start:
INCLUDE "crt/classic/crt_init_sp.inc"
INCLUDE "crt/classic/crt_init_atexit.inc"
call crt0_init
INCLUDE "crt/classic/crt_init_eidi.inc"
INCLUDE "crt/classic/crt_init_heap.inc"
INCLUDE "crt/classic/crt_init_eidi.inc"
call _main ; Call user program
__Exit:
call crt0_exit
Expand Down
11 changes: 9 additions & 2 deletions libsrc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ TOCREATE += $(call check_target,excali64,excali64_clib.lib $(CPMLIBS))
TOCREATE += $(call check_target,fp1100,fp1100_clib.lib)
TOCREATE += $(call check_target,g800,g800_clib.lib)
TOCREATE += $(call check_target,gal,gal_clib.lib)
TOCREATE += $(call check_target,gemini $(CPMLIBS))
TOCREATE += $(call check_target,gemini gemini.lib $(CPMLIBS))
TOCREATE += $(call check_target,gb,gb_clib.lib)
TOCREATE += $(call check_target,gl,gl_clib.lib)
TOCREATE += $(call check_target,gl6000,gl6000_clib.lib)
Expand All @@ -73,7 +73,7 @@ TOCREATE += $(call check_target,mbc200,mbc200.lib $(CPMLIBS))
TOCREATE += $(call check_target,mc1000,mc1000_clib.lib)
TOCREATE += $(call check_target,micro8085,micro8085_clib.lib)
TOCREATE += $(call check_target,mikro80,mikro80_clib.lib)
TOCREATE += $(call check_target,msx,msx_clib.lib msx2.lib)
TOCREATE += $(call check_target,msx,msx_clib.lib msx2.lib cpm_msx.lib)
TOCREATE += $(call check_target,mtx,mtx_clib.lib)
TOCREATE += $(call check_target,multi8,multi8_clib.lib)
TOCREATE += $(call check_target,myvision,myvision_clib.lib)
Expand Down Expand Up @@ -997,6 +997,13 @@ msx_clib.lib: $(TARGET_CLIB_OBJS)
TARGET=msx TYPE=z80 DEVICE=nodevice $(LIBLINKER) -DSTANDARDESCAPECHARS -DFORmsx -x$(OUTPUT_DIRECTORY)/msx_clib @$(TARGET_DIRECTORY)/msx/msx.lst
TARGET=msx TYPE=z80 DEVICE=nodevice $(LIBLINKER) -DSTANDARDESCAPECHARS -DFORmsx -x$(OUTPUT_DIRECTORY)/msxbios @$(TARGET_DIRECTORY)/msx/arch_msxbios.lst

cpm_msx.lib: msx_clib.lib
@echo ''
@echo '--- Building MSX (CP/M) Library ---'
@echo ''
TARGET=msx TYPE=z80 DEVICE=nodevice $(LIBLINKER) -DSTANDARDESCAPECHARS -DFORmsx -x$(OUTPUT_DIRECTORY)/cpm_msx @$(TARGET_DIRECTORY)/msx/cpm_msx.lst


msx2.lib:
@echo ''
@echo '--- Building MSX2 Library ---'
Expand Down
28 changes: 28 additions & 0 deletions libsrc/target/msx/cpm_msx.lst
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
target/msx/fcntl/msxdos1/__bdos.asm
@stdio/ansicore.lst
@video/tms9918/video_tms9918.lst
@stdio/stdio_binary.lst
target/msx/time/clock
target/msx/time/time
target/msx/time/target_read_structtm
@target/cpm/fcntl/fcntl.lst
@gfx/narrow/gfx_narrow.lst
target/msx/games/joystick
target/msx/games/bit_open
target/msx/games/bit_open_di
target/msx/games/bit_close
target/msx/games/bit_close_ei
@games/games.lst
target/msx/psg/psg_init
target/msx/psg/get_psg
target/msx/psg/set_psg
target/msx/psg/set_psg_callee
target/msx/psg/asm_wyz_hardware_out
target/msx/psg/asm_vt2_hardware_out
target/msx/psg/asm_arkos_msx_smc
target/msx/psg/asm_arkos_msx_rom
@psg/ay/psg.lst
@psg/ay/vt2/psg_vt2.lst
@psg/ay/wyz/psg_wyz.lst
@psg/ay/arkos/psg_arkos.lst
@target/msx/arch_msx.lst
8 changes: 6 additions & 2 deletions support/multitarget_build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,15 @@ ZLDFLAGS_zx_rom = -lndos


# Setup the CP/M mappings to +cpm
CPMSUBTYPES = aussie px pxansi px8 pxansi px4 px4ansi einstein einstein256 attache osborne1 kaypro83 \
CPMSUBTYPES = aussie px px8 pxansi px4 px4ansi einstein einstein256 attache osborne1 kaypro83 \
kaypro84 mz2500 microbee qc10 nascom tiki100 svi dmv adam smc777 pasopia \
msx bic excali64 lynx x1 rc700 fp1100 zxplus3 vector06c bondwell bondwell2 \
cpc pcw40 pcw80 corvette nabu mbc200 mbc1100 mbc1160 mbc2000 x820 partner v1050 \
tim011 hz89 hz100 ptcpm
tim011 hz89 hz100 ptcpm lec80t zxlec scorpion atmturbo quorum diskface \
actrix actrixss altos5 altos580 ampro amust amustold apple2 bbc beehive \
bigboard fmgcpm gemini gnat10 holmes hp125 lifeboat max80 magnolia \
merchant micromate montezuma m4cpm3 mz80 mz800 teletek televideo \
cortex vt180 lnw80

define setup_cpm_subtypes
Z88DKTARGET_cpm_$(1) = cpm
Expand Down
18 changes: 12 additions & 6 deletions test/feature/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ FEATURE_TARGETS = abc80 abc800 ace adam agon alphatro altair8800 aquarius aquari
pv2000 rcmx000 rx78 sam sam_allram sam_highram sc3000 sc3000_rom s1mp3 smc777 sms sol20 sos spc1000 special srr super80 super80_vduem svi svi_rom svi_rom318 svi_disk test ti82 ti83 ti85 ti86 ti83p \
trs80 ts2068 tvc vector06c vector06c_disk vg5k vz x07 x1 z1013 z9001 z88 z88_app zx zx_rom zx80 zx81 zxn zxn_dot

FEATURE_TARGETS += cpm_px8 cpm_px4 cpm_einstein cpm_einstein256 cpm_attache cpm_osborne1 cpm_kaypro83 cpm_kaypro84 \
cpm_mz2500 cpm_microbee cpm_qc10 cpm_nascom cpm_tiki100 cpm_svi cpm_dmv cpm_adam \
cpm_smc777 cpm_rc700 cpm_fp1100 cpm_x1 cpm_lynx cpm_bic cpm_excali64 cpm_vector06c \
cpm_zxplus3 cpm_bondwell cpm_bondwell2 cpm_8080 cpm_aussie cpm_cpc cpm_pcw40 cpm_pcw80 cpm_nabu cpm_corvette \
cpm_mbc200 cpm_mbc1100 cpm_mbc1160 cpm_mbc2000 cpm_x820 cpm_partner cpm_v1050 \
cpm_tim011 cpm_hz89 cpm_hz100
FEATURE_TARGETS += $(patsubst %,cpm_%, $(CPMSUBTYPES))

CFLAGS += -pragma-define:CRT_HEAP_AMALLOC=1

Expand All @@ -33,6 +28,17 @@ LDFLAGS_osca_feature = -lflosdos
LDFLAGS_zx_feature = -lp3
LDFLAGS_zxn_feature = -lesxdos

# Just need a graphics library for CP/M on TRS80
LDFLAGS_cpm_ptcpm_feature = -lgfxtrs80
LDFLAGS_cpm_fmgcpm_feature = -lgfxtrs80
LDFLAGS_cpm_holmes_feature = -lgfxtrs80
LDFLAGS_cpm_lifeboat_feature = -lgfxtrs80
LDFLAGS_cpm_lnw80_feature = -lgfxtrs80
LDFLAGS_cpm_max80_feature = -lgfxtrs80
LDFLAGS_cpm_merchant_feature = -lgfxtrs80
LDFLAGS_cpm_montezuma_feature = -lgfxtrs80
LDFLAGS_cpm_m4cpm3_feature = -lgfxtrs80



OUTPUT_BINS += $(foreach target, $(FEATURE_TARGETS), build/$(target)/feature.bin )
Expand Down

0 comments on commit ab0ac26

Please sign in to comment.