]> 4ch.mooo.com Git - 16.git/commitdiff
cleanup, get working, linking to DOSLIB, also build step to make
authorJonathan Campbell <jonathan@castus.tv>
Fri, 18 Mar 2016 10:44:13 +0000 (03:44 -0700)
committerJonathan Campbell <jonathan@castus.tv>
Fri, 18 Mar 2016 10:44:13 +0000 (03:44 -0700)
PCX2VRL sprite compiler, makefile step to produce test VRL+PAL
combination for TESUTO.EXE, and DOS batch file to show how to see
sample VRL.

.gitignore
cutetest.bat [new file with mode: 0644]
makefile
src/lib/doslib
src/tesuto.h

index 7345f26390b9862ed40acb935c2c290b35350814..aa3c9906a6f90b711312ea0625ce7f37d24dbe18 100755 (executable)
@@ -27,4 +27,8 @@ img
 #!foo.html\r
 # Ignore objects and archives.\r
 *.[oa]\r
-\r
+cute.vrl\r
+cute.pal\r
+dl_vga.lib\r
+dl_cpu.lib\r
+dl_dos.lib\r
diff --git a/cutetest.bat b/cutetest.bat
new file mode 100644 (file)
index 0000000..efaf91d
--- /dev/null
@@ -0,0 +1,3 @@
+@echo off
+tesuto cute.vrl cute.pal
+
index 8d1771e36f690622146e3f14e6ce3a2b0c760e94..3aeb7643143a8d074f7a5b0c36a0b11e24719723 100755 (executable)
--- a/makefile
+++ b/makefile
@@ -75,6 +75,7 @@ CFLAGS=$(AFLAGS) $(IFLAGS)-lr -l=dos -wo##wwww
 OFLAGS=-obmiler -out -oh -ei -zp8 -fpi87  -onac -ol+ -ok####x
 FLAGS=$(CFLAGS) $(OFLAGS) $(DFLAGS) $(ZFLAGS)
 
+PCX2VRL=$(DOSLIBDIR)/hw/vga/pcx2vrl
 
 DOSLIBEXMMOBJ = himemsys.$(OBJ) emm.$(OBJ)
 VGMSNDOBJ = vgmSnd.$(OBJ) 16_snd.$(OBJ)
@@ -92,7 +93,17 @@ EXEC = 16.exe bakapi.exe $(TESTEXEC) tesuto.exe
 
 !include $(DOSLIBDIR)/extdep.mak
 
-all: $(EXEC)
+all: $(EXEC) datatest
+
+cute.vrl: data/cute.pcx $(PCX2VRL)
+       $(PCX2VRL) -i data/cute.pcx -o cute.vrl -p cute.pal -tc 254
+       # you can then test this against TESUTO.EXE by typing: TESUTO CUTE.VRL CUTE.PAL
+
+datatest: cute.vrl .symbolic
+
+# doslib PCX to VRL converter native host binary
+$(PCX2VRL): $(DOSLIBDIR)/hw/vga/pcx2vrl.c
+       cd $(DOSLIBDIR)/hw/vga && make pcx2vrl
 
 #$(16LIBOBJS) => 16.lib bug....
 
@@ -121,7 +132,7 @@ tesuto.exe: tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ)
 #      @wlink @tmp.cmd
        wcl $(FLAGS) $(WCLQ) tesuto.$(OBJ) $(DOSLIBLIBS) 16_head.$(OBJ)
 tesuto.$(OBJ): $(SRC)tesuto.c
-       wcl $(FLAGS) $(WCLQ) -c $(SRC)tesuto.c
+       wcl $(FLAGS) $(DOSLIB_CINCLUDE) $(WCLQ) -c $(SRC)tesuto.c
 #tesuto.exe: tesuto.$(OBJ)
 #      wcl $(WCLQ) -mh -d2 tesuto.$(OBJ)
 #tesuto.$(OBJ): $(SRC)tesuto.c
@@ -300,13 +311,16 @@ vgmsnd.lib: $(VGMSNDOBJ)
 
 # library deps 16-bit huge
 dl_vga.lib:
-       cd $(DOSLIBDIR)/hw/vga/dos86h && ./make.sh
+       cd $(DOSLIBDIR)/hw/vga && ./make.sh
+       cp $(DOSLIBDIR)/hw/vga/dos86h/vga.lib dl_vga.lib
 
 dl_cpu.lib:
-       cd $(DOSLIBDIR)/hw/cpu/dos86h && ./make.sh
+       cd $(DOSLIBDIR)/hw/cpu && ./make.sh
+       cp $(DOSLIBDIR)/hw/cpu/dos86h/cpu.lib dl_cpu.lib
 
 dl_dos.lib:
-       cd $(DOSLIBDIR)/hw/dos/dos86h && ./make.sh
+       cd $(DOSLIBDIR)/hw/dos && ./make.sh
+       cp $(DOSLIBDIR)/hw/dos/dos86h/dos.lib dl_dos.lib
 
 modex16.$(OBJ): $(SRCLIB)modex16.h $(SRCLIB)modex16.c
        wcl $(FLAGS) -c $(SRCLIB)modex16.c
index 36710d8b91d259ed353e537c17a387e737924469..43602004dc8f1a027ec186d3bf87a808c40083f5 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 36710d8b91d259ed353e537c17a387e737924469
+Subproject commit 43602004dc8f1a027ec186d3bf87a808c40083f5
index e2bdeae7faa321d9bf7cc54221e82c23a9ad4487..8703081de59879c4690222b33df0fcc9d128dcb3 100755 (executable)
@@ -7,9 +7,9 @@
 #include "src/lib/doslib/hw/dos/dos.h"
 
 
-typedef unsigned char far *VGA_RAM_PTR;
-VGA_RAM_PTR vga_graphics_ram = (VGA_RAM_PTR)MK_FP(0xA000,0x0000);
-unsigned char vga_stride = 80; // 80 x 4 = 320 for 320-pixel wide modes
+//typedef unsigned char far *VGA_RAM_PTR;
+//VGA_RAM_PTR vga_graphics_ram = (VGA_RAM_PTR)MK_FP(0xA000,0x0000);
+//unsigned char vga_stride = 80; // 80 x 4 = 320 for 320-pixel wide modes
 
 /*static inline void vga_write_sequencer(unsigned char i,unsigned char c) {
     outp(0x3C4,i);