diff --git a/lib/config/cpm.cfg b/lib/config/cpm.cfg index efe30751ea3..d90dad96e5c 100644 --- a/lib/config/cpm.cfg +++ b/lib/config/cpm.cfg @@ -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__ @@ -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__ diff --git a/lib/target/coleco/classic/rom.asm b/lib/target/coleco/classic/rom.asm index 360ce3328f0..cbfc739429d 100644 --- a/lib/target/coleco/classic/rom.asm +++ b/lib/target/coleco/classic/rom.asm @@ -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: diff --git a/lib/target/cpc/classic/cpc_crt0.asm b/lib/target/cpc/classic/cpc_crt0.asm index d44c9126bb4..9f9afc28976 100644 --- a/lib/target/cpc/classic/cpc_crt0.asm +++ b/lib/target/cpc/classic/cpc_crt0.asm @@ -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 diff --git a/lib/target/embedded/classic/embedded_crt0.asm b/lib/target/embedded/classic/embedded_crt0.asm index f7baf33d35c..54f9d9d737d 100644 --- a/lib/target/embedded/classic/embedded_crt0.asm +++ b/lib/target/embedded/classic/embedded_crt0.asm @@ -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 diff --git a/lib/target/enterprise/classic/enterprise_crt0.asm b/lib/target/enterprise/classic/enterprise_crt0.asm index 46b8aa5c5f2..5c362ae7a26 100755 --- a/lib/target/enterprise/classic/enterprise_crt0.asm +++ b/lib/target/enterprise/classic/enterprise_crt0.asm @@ -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 diff --git a/lib/target/gl/classic/gl_crt0.asm b/lib/target/gl/classic/gl_crt0.asm index e9d1b55fd5e..086f35b54af 100644 --- a/lib/target/gl/classic/gl_crt0.asm +++ b/lib/target/gl/classic/gl_crt0.asm @@ -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: diff --git a/lib/target/m5/classic/rom.asm b/lib/target/m5/classic/rom.asm index 649691435b1..8b38e4c78c6 100755 --- a/lib/target/m5/classic/rom.asm +++ b/lib/target/m5/classic/rom.asm @@ -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 diff --git a/lib/target/pv1000/classic/pv1000_crt0.asm b/lib/target/pv1000/classic/pv1000_crt0.asm index d627cb43c8d..f8f4e40752b 100644 --- a/lib/target/pv1000/classic/pv1000_crt0.asm +++ b/lib/target/pv1000/classic/pv1000_crt0.asm @@ -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 diff --git a/lib/target/z80tvgame/classic/z80tvgame_crt0.asm b/lib/target/z80tvgame/classic/z80tvgame_crt0.asm index 7ecd5957216..b5064256e86 100755 --- a/lib/target/z80tvgame/classic/z80tvgame_crt0.asm +++ b/lib/target/z80tvgame/classic/z80tvgame_crt0.asm @@ -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 diff --git a/libsrc/Makefile b/libsrc/Makefile index f0c38ce1698..bd47e68ae3e 100644 --- a/libsrc/Makefile +++ b/libsrc/Makefile @@ -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) @@ -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) @@ -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 ---' diff --git a/libsrc/target/msx/cpm_msx.lst b/libsrc/target/msx/cpm_msx.lst new file mode 100644 index 00000000000..facaa4b0aa6 --- /dev/null +++ b/libsrc/target/msx/cpm_msx.lst @@ -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 diff --git a/support/multitarget_build/Makefile b/support/multitarget_build/Makefile index 77a34d632d9..df0c0885940 100644 --- a/support/multitarget_build/Makefile +++ b/support/multitarget_build/Makefile @@ -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 diff --git a/test/feature/Makefile b/test/feature/Makefile index ca2bd7cabec..0a73d272816 100644 --- a/test/feature/Makefile +++ b/test/feature/Makefile @@ -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 @@ -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 )