From d1afc5ac72e8a6ef18d244d66788fce7b783e9a8 Mon Sep 17 00:00:00 2001 From: sparky4 Date: Wed, 3 Aug 2016 09:32:13 -0500 Subject: [PATCH] wwww --- PLZPART/ASMYT.OBJ | Bin 55949 -> 0 bytes PLZPART/COPPER.OBJ | Bin 3584 -> 0 bytes PLZPART/INCLUDE.OBJ | Bin 3301 -> 0 bytes PLZPART/MAIN.C | 25 +- PLZPART/Makefile | 21 + PLZPART/PLZ.C | 129 ++--- PLZPART/PLZA.OBJ | Bin 17912 -> 0 bytes PLZPART/PLZFILL.C | 32 +- PLZPART/PLZPART.MAP | 827 --------------------------------- PLZPART/TWEAK.H | 7 +- PLZPART/TWEAK.OBJ | Bin 2733 -> 0 bytes PLZPART/VECT.C | 81 ++-- PLZPART/asmyt.c | 111 +++++ PLZPART/common.h | 25 + PLZPART/copper.c | 204 ++++++++ PLZPART/opengl.c | 153 ++++++ PLZPART/opengl.h | 4 + PLZPART/plza.c | 38 ++ PLZPART/sinit.c | 167 +++++++ PLZPART/spline.c | 7 + PLZPART/tweak.c | 15 + PLZPART/vga.c | 126 +++++ plzpart-gl/Makefile | 20 + plzpart-gl/common.h | 25 + plzpart-gl/main.c | 32 ++ plzpart-gl/opengl.c | 135 ++++++ plzpart-gl/opengl.h | 4 + plzpart-gl/plz.glsl | 482 +++++++++++++++++++ plzpart-gl/plzpart | Bin 0 -> 51868 bytes {PLZPART => u2plz}/ASMYT.ASM | 0 {PLZPART => u2plz}/COPPER.ASM | 0 {PLZPART => u2plz}/INCLUDE.ASM | 0 {PLZPART => u2plz}/LSINI.PRE | 0 {PLZPART => u2plz}/LSINI16.INC | 0 {PLZPART => u2plz}/LSINI4.INC | 0 {PLZPART => u2plz}/MAIN.ASM | 0 u2plz/MAIN.C | 13 + u2plz/PLZ.C | 219 +++++++++ {PLZPART => u2plz}/PLZA.ASM | 0 u2plz/PLZFILL.C | 186 ++++++++ {PLZPART => u2plz}/PLZPART.DSK | Bin {PLZPART => u2plz}/PLZPART.PRJ | Bin {PLZPART => u2plz}/PSINI.INC | 0 {PLZPART => u2plz}/PSINI.PRE | 0 {PLZPART => u2plz}/PTAU.INC | 0 u2plz/PTAU.PRE | 10 + {PLZPART => u2plz}/RATA.INC | 0 {PLZPART => u2plz}/SINIT.INC | 0 {PLZPART => u2plz}/SPLINE.ASM | 0 {PLZPART => u2plz}/SPLINE.INC | 0 {PLZPART => u2plz}/TILE.INC | 0 {PLZPART => u2plz}/TILEPAL.INC | 0 {PLZPART => u2plz}/TWEAK.ASM | 0 u2plz/TWEAK.H | 12 + u2plz/VECT.C | 299 ++++++++++++ {PLZPART => u2plz}/X.BAT | 0 56 files changed, 2460 insertions(+), 949 deletions(-) delete mode 100755 PLZPART/ASMYT.OBJ delete mode 100755 PLZPART/COPPER.OBJ delete mode 100755 PLZPART/INCLUDE.OBJ create mode 100755 PLZPART/Makefile delete mode 100755 PLZPART/PLZA.OBJ delete mode 100755 PLZPART/PLZPART.MAP delete mode 100755 PLZPART/TWEAK.OBJ create mode 100755 PLZPART/asmyt.c create mode 100755 PLZPART/common.h create mode 100755 PLZPART/copper.c create mode 100755 PLZPART/opengl.c create mode 100755 PLZPART/opengl.h create mode 100755 PLZPART/plza.c create mode 100755 PLZPART/sinit.c create mode 100755 PLZPART/spline.c create mode 100755 PLZPART/tweak.c create mode 100755 PLZPART/vga.c create mode 100755 plzpart-gl/Makefile create mode 100755 plzpart-gl/common.h create mode 100755 plzpart-gl/main.c create mode 100755 plzpart-gl/opengl.c create mode 100755 plzpart-gl/opengl.h create mode 100755 plzpart-gl/plz.glsl create mode 100755 plzpart-gl/plzpart rename {PLZPART => u2plz}/ASMYT.ASM (100%) rename {PLZPART => u2plz}/COPPER.ASM (100%) rename {PLZPART => u2plz}/INCLUDE.ASM (100%) rename {PLZPART => u2plz}/LSINI.PRE (100%) rename {PLZPART => u2plz}/LSINI16.INC (100%) rename {PLZPART => u2plz}/LSINI4.INC (100%) rename {PLZPART => u2plz}/MAIN.ASM (100%) create mode 100755 u2plz/MAIN.C create mode 100755 u2plz/PLZ.C rename {PLZPART => u2plz}/PLZA.ASM (100%) create mode 100755 u2plz/PLZFILL.C rename {PLZPART => u2plz}/PLZPART.DSK (100%) rename {PLZPART => u2plz}/PLZPART.PRJ (100%) rename {PLZPART => u2plz}/PSINI.INC (100%) rename {PLZPART => u2plz}/PSINI.PRE (100%) rename {PLZPART => u2plz}/PTAU.INC (100%) create mode 100755 u2plz/PTAU.PRE rename {PLZPART => u2plz}/RATA.INC (100%) rename {PLZPART => u2plz}/SINIT.INC (100%) rename {PLZPART => u2plz}/SPLINE.ASM (100%) rename {PLZPART => u2plz}/SPLINE.INC (100%) rename {PLZPART => u2plz}/TILE.INC (100%) rename {PLZPART => u2plz}/TILEPAL.INC (100%) rename {PLZPART => u2plz}/TWEAK.ASM (100%) create mode 100755 u2plz/TWEAK.H create mode 100755 u2plz/VECT.C rename {PLZPART => u2plz}/X.BAT (100%) diff --git a/PLZPART/ASMYT.OBJ b/PLZPART/ASMYT.OBJ deleted file mode 100755 index cccfe42693ea5329f51b6de495657daa404467cc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 55949 zcmeHw2Y6LQ7ww!LLY0oR&_WR-O$9-@^dd+{K!MOh4@IO2mmYfPNRdcTKvA(Eh$x|m z2&f=Yu?Iy&uwX$zQQq2nW^M@q{e1uboTy+9B;6oZ6O7-XNkmQ{CG)>eSwD(5hjhKbCuMqAr`A=eWY^KB%e~nq&)KMs#zzT}=!L z+paDKhi%sogF?3lRuze1+ttGD4Xhq+Z(xmZdxNWne?PcdrthnVpKovtF);LeL#l@J zhg1va52>DsUqcK~$0z3&!iwsiIB4vk{zLkRG*K(b5x(Qa#BIs>@J){HBl?WQmx(=w z_ZU%lpXe0$HYdJyyYo{#SejR^5c-4 zbRx>eh><;pkDQk-?$>9cjIK2n(B^4dG)jsRzAp+3S5$J6vSGCd&R$mJ=JgwC-N>1g z9s7%7y$t?x@K!P2vW3T6#d*sR*?6l2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gIW&UC-Pa;6AUo@!&qg+!$~xye7+UJh)}C9_>^Cw+hy{ z{DNB<>#kD)+`^JuIc1}1dG9!#a7cbWq%sbPQHP}9kYaoYCeEkY@(`yrxPrMAz|En! zY2ZdNwnLnikkxN)67i-cd6p$0e2yD zqriPcanrzE!Q9c{PFLJ0a3?d@26vv~W`H}3xqfi1eX>{xa4$1gfSVnAxwmT`m+E2N zb&|mS3Ez{abYWs#>i5jObU7~dH>?pi2Hf*lcb#N#KU3VZ;C{s13*dgGxIS>dVD55o z-&WjH;2vb|&)~kVxbff~eN8IT?djI$!n69i-*5J2_4U$D*!~lF{D*RX|Hi?xvrHjI F{vWXF^=AM8 diff --git a/PLZPART/COPPER.OBJ b/PLZPART/COPPER.OBJ deleted file mode 100755 index 211743a51f0874ac221e60331717550933b7942b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3584 zcma)8eNa@_75|<6dhad^i;63XvRD%}jlbWgVgP!|VVb{OH&bjY* zKJGd9-goZrvB3swj@ReQEp~ZI3bzI`01Wr9X;@a5;c0BFT)nKOvLPd*w6dXbRb6dH zwkvZ-a3I{Du34KqH)dW}(8$Jub_1|d!oAzt2O=SwH{j1*ayTv>fXPhub`=(FPO*1^FSNr1ORr(cOBNUdHJPXjn&9rV&Wq|g@P@)sy=3DKG_A@d8W_5=0GIFvc6QVTdv445$1S9 z)Run zbnkFX-jc#|69da@>Kf%-=}rbN^|@IgAsvAg4R!VW7I*jMwX;jrUG)_;CSZu}u_13u z5_^=uin;(hRA6J@l>Tgu%NuHJKzpBS0MD`N*&3TF8k(%!Y<<3%N;S`L^8Y^MsjpjI zU)NM|4j8X{`XYL(06zT8Kz$PCv_$PKD+ccsFDaps_4IFw)0Be3gun8cJA zOkjH&<54U&T^p`zCMdc#Le~gF*V1*(%)KJ>IRVQs)f}|IeT7TEVwlutp>OMoJG@M3-T<*09nxlEn;raN8TbQUv+(uC}qEo31CUa7Y z+wCpQEtXkQ)OkTWo6KCNK(CyozSx&$k_@RR1CsUI53RIGz`ZGr1NhioP53+7{h2BpXhkjCg4$IVKg3R z>l1hk--HX(*g6vv;Xx)e_Rhg1Z7l{fJee#?~(V>RAIEsmoOC%NKjG~f(Z{QyrR zf(TB62=$G`?#r`#x3Ox?kFFiSBWs2oP|+62b1~-Skym4 zRnH?q{SZm&pD;kZfPw0tF-ZL@Qq;d8P5lT?^<#`yJ1|!LJ6!5TWT~B)s$POy?ZO=O zG78nJC{nM%uXbah`Y9Hv*Re$X7rw3DK)Kq3O7-7Zss0bu>McAbzQTBM8xzDGOceJp zN%Z0gLEM!Fnl6kqOPI(l%#g7p`aK` zo5hLXV7^5OdBvW>+(3?Z!F)gSA^{hoSDQbh0j=2UlSTvH3J&04MH>0KGr5up3DKLW z=?oylRFuiPbXCZ(62GTd&uB$)f5wuW;sP0J!@-!01!dBfgzG^EPq*b1cuVAxe`8>s*5@{|H$MQAI4lDK^e!A{i&cgL257cDUBY?xHGkPNFD*m10Imk(4Xd+Fe94eqvDyOHY ziPqC*+D2=3?!|@Kemb4&rwcxQmhf{aKP&unvX*5nOEXIw%MV$$vm9XgHOo`c3N^R@vIi$2*J9gQ$ z;d1hZv-X}P5m&Qp0kXG@BOPu)qg8Kfk8Ji_G zhcp{wi^P_Ymc&?*SP5y#j8%!%kT#I9kXVGY6vkGGts%|9I6>lske15WCb2D~4P%@r zabidt&NxZpq>z@**emU9#!+ XILIE}FPrXl2PKE!;HLAoNj~^Lj;WI_ diff --git a/PLZPART/INCLUDE.OBJ b/PLZPART/INCLUDE.OBJ deleted file mode 100755 index 399b9e2f742e9d56bef4ab8d4ad70da8b7b1cd7f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3301 zcmeHK`9GBF8-B;Eh{;li&Xjc|ofH#C3NuBFwHV4_jI}ZLFv&XajBS$ah9+fAPLno~ zb|K42XgNuiEX_%EQb}b?-v{U8^!*>s56{efU)TNI%k{kTex8A4AZe=oE?Z}F3tftn zoikq*f*=Bo9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4?jLU_lWhF_+;cs$)6ri z2|ay1!e_3%%Fmxa7xuaJ69xtcN(Q}O5QoNwM8hE?`lDY)ufODo&Hs{o)%hxK%=NW< ziH!ud4Xg4-{N~)-@V~dcgT`COGvB*>Socx +#include "../dis/dis.h" +#include "graphics.h" +#include "opengl.h" +#include "common.h" -extern plz(); -extern vect(); +extern void plz(); +extern void vect(); -main() { +int main(int argc, char **argv) { + int a = adjust_framerate(); dis_partstart(); + + if (init_graphics("Plzpart", argc, argv) < 0) { + fprintf(stderr, "Can't init graphics\n"); + return -1; + }; + + init_opengl(); init_copper(); initvect(); plz(); - vect(); + //vect(); close_copper(); - } \ No newline at end of file + return 0; + } diff --git a/PLZPART/Makefile b/PLZPART/Makefile new file mode 100755 index 0000000..ab5b059 --- /dev/null +++ b/PLZPART/Makefile @@ -0,0 +1,21 @@ + +PLZPART_OBJS = plz.o copper.o asmyt.o tweak.o vect.o vga.o opengl.o \ + plza.o plzfill.o sinit.o spline.o main.o + +PLZPART_PATH = plzpart + +PLZPART_PATH_OBJS = $(addprefix $(PLZPART_PATH)/,$(PLZPART_OBJS)) + +PLZPART_BIN = plzpart + +OBJS += $(PLZPART_PATH_OBJS) + +default-plzpart: + $(MAKE) -C .. plzpart-all + +plzpart-all: $(PLZPART_PATH)/$(PLZPART_BIN) + +$(PLZPART_PATH)/$(PLZPART_BIN): $(PLZPART_PATH_OBJS) + $(LD) -o $@ $(LDFLAGS) $(PLZPART_PATH_OBJS) $(LIBS) + +plz.c: tweak.h ptau.pre diff --git a/PLZPART/PLZ.C b/PLZPART/PLZ.C index 420736d..085fa8d 100755 --- a/PLZPART/PLZ.C +++ b/PLZPART/PLZ.C @@ -1,11 +1,17 @@ #include +#include +#include #include -#include -#include +//#include +//#include #include "tweak.h" +#include "../dis/dis.h" +#include "opengl.h" +#include "graphics.h" +#include "common.h" -//#define DO_TABLES -//#define DPII (3.1415926535*2.0) +#define DO_TABLES +#define DPII (3.1415926535*2.0) #define LINELEN 41 #define MAXY 280 @@ -28,9 +34,13 @@ extern far int do_pal; extern int plzline(int y, int vseg); extern int setplzparas(int c1, int c2, int c3, int c4); extern int set_plzstart(int y); -extern char far psini[16384]; -extern int far lsini4[8192]; -extern int far lsini16[8192]; +//extern char far psini[16384]; +//extern int far lsini4[8192]; +//extern int far lsini16[8192]; + +unsigned char *psini; +short *lsini4; +short *lsini16; //int (* vmem)[LINELEN]=MK_FP(0x0a000,0); //char psini[16384]= @@ -38,10 +48,12 @@ extern int far lsini16[8192]; //char lsini[16384]= //#include "lsini.pre" +void init_plz(void); + char ptau[256]= #include "ptau.pre" -int pals[6][768]; +int16_t pals[6][768]; int curpal=0; int timetable[10]={64*6*2-45,64*6*4-45,64*6*5-45,64*6*6-45,64*6*7+90,0}; int ttptr=0; @@ -59,28 +71,35 @@ int inittable[10][8]={{1000,2000,3000,4000,3500,2300,3900,3670}, {1000,2000,3000,4000,3500,2300,3900,3670}, {1000,2000,3000,4000,3500,2300,3900,3670}}; -plz(){ - register int x,y; - int *ptr; +int fixme_dis_getmframe() +{ + static int s_nResult = 0; + s_nResult++; + return s_nResult; +} + +void plz(){ + register int /*x,*/y; + //int *ptr; long tim=0,count=0; - int ch=0,sync=2; + //int ch=0,sync=2; while(dis_musplus()<0 && !dis_exit()); dis_setmframe(0); init_plz(); cop_drop=128; - cop_fadepal=pals[curpal++]; + cop_fadepal=(char *)pals[curpal++]; frame_count=0; while(!dis_exit()) { tim+=frame_count; frame_count=0; count++; - if(dis_getmframe()>timetable[ttptr]) + if(fixme_dis_getmframe()>timetable[ttptr]) { memset(fadepal,0,768); cop_drop=1; - cop_fadepal=pals[curpal++]; + cop_fadepal=(char *)pals[curpal++]; ttptr++; il1=inittable[ttptr][0]; il2=inittable[ttptr][1]; @@ -93,47 +112,53 @@ plz(){ } if(curpal==5 && cop_drop>64) break; - asm mov dx, 3c4h - asm mov ax, 0a02h - asm out dx, ax + // [nk] VGA: select bit planes 0,2 (?) + //asm mov dx, 3c4h + //asm mov ax, 0a02h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j{tm2GxXMd;-&)K?lH#Qv&`*&mg>R*Tzhp^ zX$hpfx1i5_O;xMe)&N4pe(=-v8hTuaz z^f1?4{C5$85AM(dTaV(u>yf`B+mZK>-N+}%7sxT>1ab!X5&0QuMsDB(Ke$Z04Tu>D jMIsTr+f5HQ;oa`tc(;2uPO~Qk$w5ZDwTtWU)2aFowi4$p diff --git a/PLZPART/PLZFILL.C b/PLZPART/PLZFILL.C index ae73c18..aebac03 100755 --- a/PLZPART/PLZFILL.C +++ b/PLZPART/PLZFILL.C @@ -1,20 +1,20 @@ #include -#include -#include +//#include +//#include #include #include "tweak.h" -extern far do_line(char far *to, int dx, int dy, int cnt, char far *from, long txx1, long txy1, long txx2, long txy2, int dseg); -extern far do_block(int ycnt); -extern far do_clear(char far *vmem, int far *otau, int far *ntau); +extern far void do_line(char far *to, int dx, int dy, int cnt, char far *from, long txx1, long txy1, long txx2, long txy2, int dseg); +extern far void do_block(int ycnt); +extern far void do_clear(char far *vmem, int far *otau, int far *ntau); extern int acstau[256]; int sini[2000]; char (* far vmem)[160]=MK_FP(0x0a000,0); -extern char far kuva1[128][256]; -extern char far kuva2[128][256]; -extern char far kuva3[128][256]; -extern char far dist1[128][256]; +/*extern*/ char far kuva1[128][256]; +/*extern*/ char far kuva2[128][256]; +/*extern*/ char far kuva3[128][256]; +/*extern*/ char far dist1[128][256]; char far buu[1000]; char sinx[128], siny[128]; char pal[768]; @@ -22,8 +22,8 @@ char pal[768]; int clrtau[8][256][2]; int clrptr=0; -initvect() { - int a,b,x,y,s,d=0,p=0,ch; +void initvect() { + int a/*,b*/,x,y,s/*,d=0,p=0,ch*/; for(a=0;a<1524;a++) { @@ -76,13 +76,13 @@ extern far long ay1,ay2,ax1,ax2,xx1,yy1,xx2,yy2; extern far long txx1,txy1,tay1,tax1; extern far long txx2,txy2,tay2,tax2; -int kuvataus[]={FP_SEG(kuva1),FP_SEG(kuva2),FP_SEG(kuva3),FP_SEG(kuva1)}; -int disttaus[]={FP_SEG(dist1),FP_SEG(dist1),FP_SEG(dist1),FP_SEG(dist1)}; +char* kuvataus[]={&kuva1[0][0],&kuva2[0][0],&kuva3[0][0],&kuva1[0][0]}; +char* disttaus[]={&dist1[0][0],&dist1[0][0],&dist1[0][0],&dist1[0][9]}; -do_poly(x1,y1,x2,y2,x3,y3,x4,y4,color, dd) +void do_poly(x1,y1,x2,y2,x3,y3,x4,y4,color, dd) int x1,y1,x2,y2,x3,y3,x4,y4,color, dd; { - int a,b,c,d,n=0,m,s1,s2,d1,d2,dx1,dy1,dx2,dy2; + int a,/*b,c,d,*/n=0,m,s1,s2,d1,d2,dx1,dy1,dx2,dy2; struct points { int x,y; } pnts[4],txt[4]={{64,4},{190,4},{190,60},{64,60}}; @@ -175,7 +175,7 @@ int x1,y1,x2,y2,x3,y3,x4,y4,color, dd; } } -clear() +void clear() { int *otau=clrtau[(clrptr-3)&7], *ntau=clrtau[clrptr]; diff --git a/PLZPART/PLZPART.MAP b/PLZPART/PLZPART.MAP deleted file mode 100755 index aaefa76..0000000 --- a/PLZPART/PLZPART.MAP +++ /dev/null @@ -1,827 +0,0 @@ - - Start Stop Length Name Class - - 00000H 027C3H 027C4H _TEXT CODE - 027C4H 027C4H 00000H ASMYT_TEXT CODE - 027D0H 0FC7BH 0D4ACH PORO CODE - 0FC7CH 10605H 0098AH COPPER_TEXT CODE - 10606H 10606H 00000H INCLUDE_TEXT CODE - 10606H 10606H 00000H PLZA_TEXT CODE - 10610H 12CCDH 026BEH LERSSICODE CODE - 12CCEH 12EA6H 001D9H TWEAK_TEXT CODE - 12EA7H 136D0H 0082AH PLZ_TEXT CODE - 136D1H 14382H 00CB2H PLZFILL_TEXT CODE - 14383H 14D78H 009F6H VECT_TEXT CODE - 14D79H 14D9BH 00023H MAIN_TEXT CODE - 14DA0H 14E73H 000D4H text_disc CODE - 14E74H 160EDH 0127AH SPLINE_TEXT CODE - 160F0H 18866H 02777H EMU_PROG CODE - 18870H 18E37H 005C8H E87_PROG CODE - 18E40H 18E40H 00000H _FARDATA FAR_DATA - 18E40H 1CE3FH 04000H KAKKA2 FAR_DATA - 1CE40H 24E3FH 08000H KAKKA6 FAR_DATA - 24E40H 28E3FH 04000H KAKKA3 FAR_DATA - 28E40H 2CE3FH 04000H KAKKA4 FAR_DATA - 2CE40H 2D84EH 00A0FH KAKKA5 FAR_DATA - 2D850H 2DC3BH 003ECH PLZFILL5_DATA FAR_DATA - 2DC40H 2DF3FH 00300H VECT5_DATA FAR_DATA - 2DF40H 2DF40H 00000H _FARBSS FAR_BSS - 2DF40H 2DF40H 00000H _OVERLAY_ OVRINFO - 2DF40H 2DF40H 00000H _1STUB_ STUBSEG - 2DF40H 31025H 030E6H _DATA DATA - 31026H 31029H 00004H _CVTSEG DATA - 3102AH 31035H 0000CH _SCNSEG DATA - 31036H 31036H 00000H _CONST CONST - 31036H 31041H 0000CH _INIT_ INITDATA - 31042H 31042H 00000H _INITEND_ INITDATA - 31042H 31047H 00006H _EXIT_ EXITDATA - 31048H 31048H 00000H _EXITEND_ EXITDATA - 31048H 36C7FH 05C38H _BSS BSS - 36C80H 36C80H 00000H _BSSEND BSSEND - 36C80H 36D8FH 00110H _STACK STACK - - -Detailed map of segments - - 0000:0000 0295 C=CODE S=_TEXT G=(none) M=c0.ASM ACBP=28 - 0000:0295 0258 C=CODE S=_TEXT G=(none) M=FPINIT ACBP=28 - 0000:04ED 0000 C=CODE S=_TEXT G=(none) M=E87TRAP ACBP=28 - 0000:04ED 0000 C=CODE S=_TEXT G=(none) M=PROTFLAG ACBP=28 - 0000:04ED 0000 C=CODE S=_TEXT G=(none) M=DEFLT87 ACBP=28 - 0000:04ED 0000 C=CODE S=_TEXT G=(none) M=HUGEVAL ACBP=28 - 0000:04ED 009A C=CODE S=_TEXT G=(none) M=LDTRUNC ACBP=28 - 0000:0587 0000 C=CODE S=_TEXT G=(none) M=MATHWHY ACBP=28 - 0000:0587 01BD C=CODE S=_TEXT G=(none) M=REALCVT ACBP=28 - 0000:0744 0395 C=CODE S=_TEXT G=(none) M=SCANTOD ACBP=28 - 0000:0AD9 020C C=CODE S=_TEXT G=(none) M=XCVT ACBP=28 - 0000:0CE5 00B1 C=CODE S=_TEXT G=(none) M=FPERR ACBP=28 - 0000:0D96 00C9 C=CODE S=_TEXT G=(none) M=_POW10 ACBP=28 - 0000:0E5F 000B C=CODE S=_TEXT G=(none) M=POW10D ACBP=28 - 0000:0E6A 002A C=CODE S=_TEXT G=(none) M=MATHERR ACBP=28 - 0000:0E94 0052 C=CODE S=_TEXT G=(none) M=SIN ACBP=28 - 0000:0EE6 00A9 C=CODE S=_TEXT G=(none) M=_MATHERR ACBP=28 - 0000:0F8F 002C C=CODE S=_TEXT G=(none) M=FFTOL ACBP=28 - 0000:0FBB 002D C=CODE S=_TEXT G=(none) M=ATEXIT ACBP=28 - 0000:0FE8 0000 C=CODE S=_TEXT G=(none) M=CTYPE ACBP=28 - 0000:0FE8 0093 C=CODE S=_TEXT G=(none) M=EXIT ACBP=28 - 0000:107B 0000 C=CODE S=_TEXT G=(none) M=FILES ACBP=28 - 0000:107B 0000 C=CODE S=_TEXT G=(none) M=FILES2 ACBP=28 - 0000:107B 0000 C=CODE S=_TEXT G=(none) M=FPSTKLEN ACBP=28 - 0000:107B 001C C=CODE S=_TEXT G=(none) M=F_SCOPY ACBP=28 - 0000:1097 0021 C=CODE S=_TEXT G=(none) M=H_LLSH ACBP=28 - 0000:10B8 0060 C=CODE S=_TEXT G=(none) M=H_PADD ACBP=28 - 0000:1118 004B C=CODE S=_TEXT G=(none) M=IOERROR ACBP=28 - 0000:1163 0011 C=CODE S=_TEXT G=(none) M=ISATTY ACBP=28 - 0000:1174 00A2 C=CODE S=_TEXT G=(none) M=LONGTOA ACBP=28 - 0000:1216 0029 C=CODE S=_TEXT G=(none) M=LSEEK ACBP=28 - 0000:123F 0021 C=CODE S=_TEXT G=(none) M=N_PCMP ACBP=28 - 0000:1260 00BA C=CODE S=_TEXT G=(none) M=SETUPIO ACBP=28 - 0000:131A 0000 C=CODE S=_TEXT G=(none) M=SIGDATA ACBP=28 - 0000:131A 0000 C=CODE S=_TEXT G=(none) M=STKLEN ACBP=28 - 0000:131A 04DB C=CODE S=_TEXT G=(none) M=VPRINTER ACBP=28 - 0000:17F5 001F C=CODE S=_TEXT G=(none) M=CVTFAK ACBP=28 - 0000:1814 0432 C=CODE S=_TEXT G=(none) M=FARHEAP ACBP=28 - 0000:1C46 0140 C=CODE S=_TEXT G=(none) M=FBRK ACBP=28 - 0000:1D86 0004 C=CODE S=_TEXT G=(none) M=REALCVT ACBP=28 - 0000:1D8A 001C C=CODE S=_TEXT G=(none) M=SETBLOCK ACBP=28 - 0000:1DA6 00CD C=CODE S=_TEXT G=(none) M=FFLUSH ACBP=28 - 0000:1E73 0042 C=CODE S=_TEXT G=(none) M=FLUSHALL ACBP=28 - 0000:1EB5 001C C=CODE S=_TEXT G=(none) M=FPRINTF ACBP=28 - 0000:1ED1 01E2 C=CODE S=_TEXT G=(none) M=FSEEK ACBP=28 - 0000:20B3 0024 C=CODE S=_TEXT G=(none) M=MEMCPY ACBP=28 - 0000:20D7 0043 C=CODE S=_TEXT G=(none) M=MEMSET ACBP=28 - 0000:211A 03C8 C=CODE S=_TEXT G=(none) M=PUTC ACBP=28 - 0000:24E2 011D C=CODE S=_TEXT G=(none) M=SETVBUF ACBP=28 - 0000:25FF 0151 C=CODE S=_TEXT G=(none) M=WRITE ACBP=28 - 0000:2750 003C C=CODE S=_TEXT G=(none) M=WRITEA ACBP=28 - 0000:278C 0038 C=CODE S=_TEXT G=(none) M=XFFLUSH ACBP=28 - 027C:0004 0000 C=CODE S=ASMYT_TEXT G=(none) M=ASMYT.ASM ACBP=48 - 027D:0000 D4AC C=CODE S=PORO G=(none) M=ASMYT.ASM ACBP=60 - 0FC7:000C 098A C=CODE S=COPPER_TEXT G=(none) M=COPPER.ASM ACBP=48 - 1060:0006 0000 C=CODE S=INCLUDE_TEXT G=(none) M=INCLUDE.ASM ACBP=48 - 1060:0006 0000 C=CODE S=PLZA_TEXT G=(none) M=PLZA.ASM ACBP=48 - 1061:0000 26BE C=CODE S=LERSSICODE G=(none) M=PLZA.ASM ACBP=68 - 12CC:000E 01D9 C=CODE S=TWEAK_TEXT G=(none) M=TWEAK.ASM ACBP=48 - 12EA:0007 082A C=CODE S=PLZ_TEXT G=(none) M=PLZ.C ACBP=28 - 136D:0001 0CB2 C=CODE S=PLZFILL_TEXT G=(none) M=PLZFILL.C ACBP=28 - 1438:0003 09F6 C=CODE S=VECT_TEXT G=(none) M=VECT.C ACBP=28 - 14D7:0009 0023 C=CODE S=MAIN_TEXT G=(none) M=MAIN.C ACBP=28 - 14DA:0000 00D4 C=CODE S=text_disc G=(none) M=disc.asm ACBP=68 - 14E7:0004 127A C=CODE S=SPLINE_TEXT G=(none) M=SPLINE.ASM ACBP=48 - 160F:0000 0000 C=CODE S=EMU_PROG G=(none) M=FPINIT ACBP=68 - 160F:0000 2777 C=CODE S=EMU_PROG G=(none) M=EMU086 ACBP=68 - 1887:0000 0000 C=CODE S=E87_PROG G=(none) M=FPINIT ACBP=68 - 1887:0000 03E3 C=CODE S=E87_PROG G=(none) M=EMU087 ACBP=68 - 1887:03F0 01D8 C=CODE S=E87_PROG G=(none) M=E87TRAP ACBP=68 - 18E4:0000 0000 C=FAR_DATA S=_FARDATA G=(none) M=c0.ASM ACBP=68 - 18E4:0000 4000 C=FAR_DATA S=KAKKA2 G=(none) M=INCLUDE.ASM ACBP=60 - 1CE4:0000 8000 C=FAR_DATA S=KAKKA6 G=(none) M=INCLUDE.ASM ACBP=60 - 24E4:0000 4000 C=FAR_DATA S=KAKKA3 G=(none) M=INCLUDE.ASM ACBP=60 - 28E4:0000 4000 C=FAR_DATA S=KAKKA4 G=(none) M=INCLUDE.ASM ACBP=60 - 2CE4:0000 0A0F C=FAR_DATA S=KAKKA5 G=(none) M=INCLUDE.ASM ACBP=60 - 2D85:0000 03EC C=FAR_DATA S=PLZFILL5_DATA G=(none) M=PLZFILL.C ACBP=68 - 2DC4:0000 0300 C=FAR_DATA S=VECT5_DATA G=(none) M=VECT.C ACBP=68 - 2DF4:0000 0000 C=FAR_BSS S=_FARBSS G=(none) M=c0.ASM ACBP=68 - 2DF4:0000 0000 C=OVRINFO S=_OVERLAY_ G=(none) M=c0.ASM ACBP=68 - 2DF4:0000 0000 C=STUBSEG S=_1STUB_ G=(none) M=c0.ASM ACBP=68 - 2DF4:0000 0093 C=DATA S=_DATA G=DGROUP M=c0.ASM ACBP=68 - 2DF4:0094 0000 C=DATA S=_DATA G=DGROUP M=ASMYT.ASM ACBP=48 - 2DF4:0094 0000 C=DATA S=_DATA G=DGROUP M=COPPER.ASM ACBP=48 - 2DF4:0094 0000 C=DATA S=_DATA G=DGROUP M=INCLUDE.ASM ACBP=48 - 2DF4:0094 0000 C=DATA S=_DATA G=DGROUP M=PLZA.ASM ACBP=48 - 2DF4:0094 0000 C=DATA S=_DATA G=DGROUP M=TWEAK.ASM ACBP=48 - 2DF4:0094 01D8 C=DATA S=_DATA G=DGROUP M=PLZ.C ACBP=48 - 2DF4:026C 0036 C=DATA S=_DATA G=DGROUP M=PLZFILL.C ACBP=48 - 2DF4:02A2 28A4 C=DATA S=_DATA G=DGROUP M=VECT.C ACBP=48 - 2DF4:2B46 0000 C=DATA S=_DATA G=DGROUP M=MAIN.C ACBP=48 - 2DF4:2B46 0000 C=DATA S=_DATA G=DGROUP M=SPLINE.ASM ACBP=48 - 2DF4:2B50 0002 C=DATA S=_DATA G=DGROUP M=FPINIT ACBP=68 - 2DF4:2B60 0000 C=DATA S=_DATA G=DGROUP M=E87TRAP ACBP=68 - 2DF4:2B60 0003 C=DATA S=_DATA G=DGROUP M=PROTFLAG ACBP=48 - 2DF4:2B64 0002 C=DATA S=_DATA G=DGROUP M=DEFLT87 ACBP=48 - 2DF4:2B66 0024 C=DATA S=_DATA G=DGROUP M=HUGEVAL ACBP=48 - 2DF4:2B8A 0000 C=DATA S=_DATA G=DGROUP M=LDTRUNC ACBP=48 - 2DF4:2B8A 0043 C=DATA S=_DATA G=DGROUP M=MATHWHY ACBP=48 - 2DF4:2BCE 0000 C=DATA S=_DATA G=DGROUP M=REALCVT ACBP=48 - 2DF4:2BCE 0018 C=DATA S=_DATA G=DGROUP M=SCANTOD ACBP=48 - 2DF4:2BE6 0000 C=DATA S=_DATA G=DGROUP M=XCVT ACBP=48 - 2DF4:2BE6 009A C=DATA S=_DATA G=DGROUP M=FPERR ACBP=48 - 2DF4:2C80 0080 C=DATA S=_DATA G=DGROUP M=_POW10 ACBP=48 - 2DF4:2D00 0000 C=DATA S=_DATA G=DGROUP M=POW10D ACBP=48 - 2DF4:2D00 0000 C=DATA S=_DATA G=DGROUP M=MATHERR ACBP=48 - 2DF4:2D00 000C C=DATA S=_DATA G=DGROUP M=SIN ACBP=48 - 2DF4:2D0C 000E C=DATA S=_DATA G=DGROUP M=_MATHERR ACBP=48 - 2DF4:2D1A 0000 C=DATA S=_DATA G=DGROUP M=FFTOL ACBP=48 - 2DF4:2D1A 0002 C=DATA S=_DATA G=DGROUP M=ATEXIT ACBP=48 - 2DF4:2D1C 0101 C=DATA S=_DATA G=DGROUP M=CTYPE ACBP=48 - 2DF4:2E1E 000C C=DATA S=_DATA G=DGROUP M=EXIT ACBP=48 - 2DF4:2E2A 0190 C=DATA S=_DATA G=DGROUP M=FILES ACBP=48 - 2DF4:2FBA 002A C=DATA S=_DATA G=DGROUP M=FILES2 ACBP=48 - 2DF4:2FE4 0002 C=DATA S=_DATA G=DGROUP M=FPSTKLEN ACBP=48 - 2DF4:2FE6 0000 C=DATA S=_DATA G=DGROUP M=F_SCOPY ACBP=48 - 2DF4:2FE6 0000 C=DATA S=_DATA G=DGROUP M=H_LLSH ACBP=48 - 2DF4:2FE6 0000 C=DATA S=_DATA G=DGROUP M=H_PADD ACBP=48 - 2DF4:2FE6 005B C=DATA S=_DATA G=DGROUP M=IOERROR ACBP=48 - 2DF4:3042 0000 C=DATA S=_DATA G=DGROUP M=ISATTY ACBP=48 - 2DF4:3042 0000 C=DATA S=_DATA G=DGROUP M=LONGTOA ACBP=48 - 2DF4:3042 0000 C=DATA S=_DATA G=DGROUP M=LSEEK ACBP=48 - 2DF4:3042 0000 C=DATA S=_DATA G=DGROUP M=N_PCMP ACBP=48 - 2DF4:3042 0000 C=DATA S=_DATA G=DGROUP M=SETUPIO ACBP=48 - 2DF4:3042 0000 C=DATA S=_DATA G=DGROUP M=SIGDATA ACBP=48 - 2DF4:3042 0002 C=DATA S=_DATA G=DGROUP M=STKLEN ACBP=48 - 2DF4:3044 0067 C=DATA S=_DATA G=DGROUP M=VPRINTER ACBP=48 - 2DF4:30AC 0031 C=DATA S=_DATA G=DGROUP M=CVTFAK ACBP=48 - 2DF4:30DE 0000 C=DATA S=_DATA G=DGROUP M=FARHEAP ACBP=48 - 2DF4:30DE 0002 C=DATA S=_DATA G=DGROUP M=FBRK ACBP=48 - 2DF4:30E0 0000 C=DATA S=_DATA G=DGROUP M=REALCVT ACBP=48 - 2DF4:30E0 0000 C=DATA S=_DATA G=DGROUP M=SETBLOCK ACBP=48 - 2DF4:30E0 0000 C=DATA S=_DATA G=DGROUP M=FFLUSH ACBP=48 - 2DF4:30E0 0000 C=DATA S=_DATA G=DGROUP M=FLUSHALL ACBP=48 - 2DF4:30E0 0000 C=DATA S=_DATA G=DGROUP M=FPRINTF ACBP=48 - 2DF4:30E0 0000 C=DATA S=_DATA G=DGROUP M=FSEEK ACBP=48 - 2DF4:30E0 0000 C=DATA S=_DATA G=DGROUP M=MEMCPY ACBP=48 - 2DF4:30E0 0000 C=DATA S=_DATA G=DGROUP M=MEMSET ACBP=48 - 2DF4:30E0 0001 C=DATA S=_DATA G=DGROUP M=PUTC ACBP=48 - 2DF4:30E2 0004 C=DATA S=_DATA G=DGROUP M=SETVBUF ACBP=48 - 2DF4:30E6 0000 C=DATA S=_DATA G=DGROUP M=WRITE ACBP=48 - 2DF4:30E6 0000 C=DATA S=_DATA G=DGROUP M=WRITEA ACBP=48 - 2DF4:30E6 0000 C=DATA S=_DATA G=DGROUP M=XFFLUSH ACBP=48 - 2DF4:30E6 0000 C=DATA S=_CVTSEG G=DGROUP M=c0.ASM ACBP=48 - 2DF4:30E6 0002 C=DATA S=_CVTSEG G=DGROUP M=REALCVT ACBP=48 - 2DF4:30E8 0002 C=DATA S=_CVTSEG G=DGROUP M=CVTFAK ACBP=48 - 2DF4:30EA 0000 C=DATA S=_CVTSEG G=DGROUP M=REALCVT ACBP=48 - 2DF4:30EA 0000 C=DATA S=_SCNSEG G=DGROUP M=c0.ASM ACBP=48 - 2DF4:30EA 0006 C=DATA S=_SCNSEG G=DGROUP M=SCANTOD ACBP=48 - 2DF4:30F0 0006 C=DATA S=_SCNSEG G=DGROUP M=CVTFAK ACBP=48 - 2DF4:30F6 0000 C=CONST S=_CONST G=DGROUP M=c0.ASM ACBP=48 - 2DF4:30F6 0000 C=INITDATA S=_INIT_ G=DGROUP M=c0.ASM ACBP=48 - 2DF4:30F6 0006 C=INITDATA S=_INIT_ G=DGROUP M=FPINIT ACBP=48 - 2DF4:30FC 0006 C=INITDATA S=_INIT_ G=DGROUP M=SETUPIO ACBP=48 - 2DF4:3102 0000 C=INITDATA S=_INITEND_ G=DGROUP M=c0.ASM ACBP=28 - 2DF4:3102 0000 C=EXITDATA S=_EXIT_ G=DGROUP M=c0.ASM ACBP=48 - 2DF4:3102 0006 C=EXITDATA S=_EXIT_ G=DGROUP M=FPINIT ACBP=48 - 2DF4:3108 0000 C=EXITDATA S=_EXITEND_ G=DGROUP M=c0.ASM ACBP=28 - 2DF4:3108 0000 C=BSS S=_BSS G=DGROUP M=c0.ASM ACBP=48 - 2DF4:3108 2400 C=BSS S=_BSS G=DGROUP M=PLZ.C ACBP=48 - 2DF4:5508 33A0 C=BSS S=_BSS G=DGROUP M=PLZFILL.C ACBP=48 - 2DF4:88A8 0412 C=BSS S=_BSS G=DGROUP M=VECT.C ACBP=48 - 2DF4:8CBA 0000 C=BSS S=_BSS G=DGROUP M=MAIN.C ACBP=48 - 2DF4:8CBA 0000 C=BSS S=_BSS G=DGROUP M=LDTRUNC ACBP=48 - 2DF4:8CBA 0000 C=BSS S=_BSS G=DGROUP M=REALCVT ACBP=48 - 2DF4:8CBA 0000 C=BSS S=_BSS G=DGROUP M=SCANTOD ACBP=48 - 2DF4:8CBA 0000 C=BSS S=_BSS G=DGROUP M=XCVT ACBP=48 - 2DF4:8CBA 0000 C=BSS S=_BSS G=DGROUP M=_POW10 ACBP=48 - 2DF4:8CBA 0000 C=BSS S=_BSS G=DGROUP M=SIN ACBP=48 - 2DF4:8CBA 0080 C=BSS S=_BSS G=DGROUP M=ATEXIT ACBP=48 - 2DF4:8D3A 0000 C=BSS S=_BSS G=DGROUP M=IOERROR ACBP=48 - 2DF4:8D3A 0000 C=BSS S=_BSS G=DGROUP M=ISATTY ACBP=48 - 2DF4:8D3A 0000 C=BSS S=_BSS G=DGROUP M=LONGTOA ACBP=48 - 2DF4:8D3A 0000 C=BSS S=_BSS G=DGROUP M=LSEEK ACBP=48 - 2DF4:8D3A 0000 C=BSS S=_BSS G=DGROUP M=SETUPIO ACBP=48 - 2DF4:8D3A 0004 C=BSS S=_BSS G=DGROUP M=SIGDATA ACBP=48 - 2DF4:8D3E 0000 C=BSS S=_BSS G=DGROUP M=VPRINTER ACBP=48 - 2DF4:8D3E 0000 C=BSS S=_BSS G=DGROUP M=SETBLOCK ACBP=48 - 2DF4:8D3E 0000 C=BSS S=_BSS G=DGROUP M=MEMCPY ACBP=48 - 2DF4:8D3E 0000 C=BSS S=_BSS G=DGROUP M=MEMSET ACBP=48 - 2DF4:8D3E 0001 C=BSS S=_BSS G=DGROUP M=PUTC ACBP=48 - 2DF4:8D40 0000 C=BSS S=_BSS G=DGROUP M=WRITEA ACBP=48 - 2DF4:8D40 0000 C=BSSEND S=_BSSEND G=DGROUP M=c0.ASM ACBP=28 - 36C8:0000 0110 C=STACK S=_STACK G=(none) M=c0.ASM ACBP=74 - 36C8:0000 0080 C=STACK S=_STACK G=(none) M=EMUVARS ACBP=78 - - Address Publics by Name - - 2DF4:0000 idle DATASEG@ - 0000:0291 idle DGROUP@ - 160F:2152 e086_Entry - 160F:26E0 e086_Shortcut - 1887:0306 e087_Entry - 1887:03C6 e087_Shortcut - 1887:0430 e087_Trap - 0000:FE32 idle FIARQQ - 0000:0E32 idle FICRQQ - 0000:5C32 Abs FIDRQQ - 0000:1632 Abs FIERQQ - 0000:0632 idle FISRQQ - 0000:A23D Abs FIWRQQ - 0000:4000 idle FJARQQ - 0000:C000 idle FJCRQQ - 0000:8000 idle FJSRQQ - 0000:0F8F idle FTOL@ - 0000:0F8F F_FTOL@ - 0000:109A idle F_LXLSH@ - 0000:10BB idle F_PADD@ - 0000:10EA idle F_PSUB@ - 0000:107B F_SCOPY@ - 0000:109A idle LXLSH@ - 0000:1097 N_LXLSH@ - 0000:10B8 N_PADD@ - 0000:123F N_PCMP@ - 0000:10E7 idle N_PSUB@ - 0000:10BB idle PADD@ - 0000:10EA idle PSUB@ - 0000:107B idle SCOPY@ - 0000:027A _abort - 0000:0FBB idle _atexit - 1061:07E8 _ax1 - 1061:07F0 _ax2 - 1061:07E4 idle _ay1 - 1061:07EC idle _ay2 - 2D85:0004 idle _buu - 1438:00B4 idle _calculate - 136D:0C5C _clear - 0FC7:001C _close_copper - 2DF4:026C idle _clrptr - 2DF4:5508 idle _clrtau - 0FC7:000E _cop_drop - 0FC7:07E8 _cop_fadepal - 0FC7:0010 _cop_pal - 0FC7:001A _cop_plz - 0FC7:0018 _cop_scrl - 0FC7:0016 _cop_start - 1438:0177 idle _count_const - 1061:081E _ctau - 2DF4:0194 idle _curpal - 2DF4:88B8 idle _cxx - 2DF4:88B6 idle _cxy - 2DF4:88B4 idle _cxz - 2DF4:88B2 idle _cyx - 2DF4:88B0 idle _cyy - 2DF4:88AE idle _cyz - 2DF4:88AC idle _czx - 2DF4:88AA idle _czy - 2DF4:88A8 idle _czz - 2DF4:2B2C _dis - 1CE4:0000 _dist1 - 2DF4:0276 idle _disttaus - 14DA:005A _dis_exit - 14DA:00BE _dis_getmframe - 14DA:0060 idle _dis_indemo - 14DA:0066 idle _dis_msgarea - 14DA:0073 idle _dis_muscode - 14DA:0080 _dis_musplus - 14DA:008F idle _dis_musrow - 14DA:0040 _dis_partstart - 14DA:009B idle _dis_setcopper - 14DA:00AE _dis_setmframe - 14DA:00CA idle _dis_sync - 14DA:0000 idle _dis_version - 14DA:0023 idle _dis_waitb - 1061:0824 _do_block - 1061:2612 _do_clear - 0FC7:0014 _do_pal - 136D:02D7 _do_poly - 1438:079F idle _draw - 1061:081C _dseg - 2DF4:007F _errno - 0000:1040 _exit - 0FC7:01E8 _fadepal - 0000:1954 idle _farfree - 0000:1A68 idle _farmalloc - 0000:1BCC idle _farrealloc - 0000:1DA6 _fflush - 0000:1E73 _flushall - 2DC4:0000 idle _fpal - 0000:1EB5 _fprintf - 0000:2136 idle _fputc - 0000:22CB idle _fputchar - 2DF4:2B40 idle _frames - 0FC7:000C _frame_count - 0000:1954 _free - 1061:0818 _from - 0000:1F53 _fseek - 0000:1FD3 idle _ftell - 14E7:1084 _getspl - 2DF4:01C4 _ik1 - 2DF4:01C6 _ik2 - 2DF4:01C8 _ik3 - 2DF4:01CA _ik4 - 2DF4:01BC _il1 - 2DF4:01BE _il2 - 2DF4:01C0 _il3 - 2DF4:01C2 _il4 - 2DF4:01CC idle _inittable - 136D:0001 _initvect - 0FC7:0047 _init_copper - 12EA:02B1 idle _init_plz - 0000:1163 _isatty - 1061:0000 idle _jmp_tau - 2DF4:01B4 _k1 - 2DF4:01B6 _k2 - 2DF4:01B8 _k3 - 2DF4:01BA _k4 - 2CE4:0200 _kosinit - 18E4:0000 _kuva1 - 24E4:0000 _kuva2 - 28E4:0000 _kuva3 - 2DF4:026E idle _kuvataus - 2DF4:2B26 _kx - 2DF4:2B28 _ky - 2DF4:2B2A _kz - 2DF4:01AC _l1 - 2DF4:01AE _l2 - 2DF4:01B0 _l3 - 2DF4:01B2 _l4 - 2DF4:2B0E idle _light_src - 2DF4:2B1A idle _lls - 0000:1216 _lseek - 027D:8000 idle _lsini16 - 027D:4000 idle _lsini4 - 2DF4:2B32 _ls_kx - 2DF4:2B34 _ls_ky - 2DF4:2B36 _ls_kz - 2DF4:2B38 idle _ls_x - 2DF4:2B3A idle _ls_y - 2DF4:2B3C idle _ls_z - 14D7:0009 _main - 0000:1A5E _malloc - 0000:0E6A _matherr - 0000:20B3 _memcpy - 0000:20FB _memset - 0FC7:0107 idle _moveplz - 2DF4:02A2 idle _object - 2DF4:2B3E idle _page - 2DF4:7508 _pal - 2DF4:3108 idle _pals - 12EA:0007 _plz - 027D:C000 _plzline - 2DF4:2B0C idle _polys - 0FC7:00D9 idle _pompota - 0000:0E5F _pow10 - 027D:0000 idle _psini - 2DF4:0094 idle _ptau - 2DF4:88BA idle _ptodraw - 0000:1BC5 idle _realloc - 1438:043C idle _rotate - 12CC:0012 idle _scr_seg - 0000:1D8A _setblock - 0000:20D7 idle _setmem - 027D:C618 _setplzparas - 0000:24E2 _setvbuf - 027D:D48E _set_plzstart - 1061:2584 _shadepal - 0000:0E94 _sin - 2DF4:7908 idle _sini - 2CE4:0000 _sinit - 2DF4:7888 idle _sinx - 2DF4:7808 idle _siny - 1438:0556 idle _sort_faces - 1438:08C5 idle _swappage - 1061:0804 _tax1 - 1061:080C _tax2 - 1061:0808 _tay1 - 1061:0810 _tay2 - 2DF4:0196 idle _timetable - 1061:0814 _to - 2DF4:01AA idle _ttptr - 12CC:007C idle _tw_closegraph - 12CC:0062 idle _tw_clrscr - 12CC:00BB idle _tw_getpixel - 12CC:0014 _tw_opengraph - 12CC:0035 _tw_opengraph2 - 12CC:0141 idle _tw_pictovmem - 12CC:0082 idle _tw_putpixel - 12CC:010B idle _tw_setpalarea - 12CC:00F2 idle _tw_setpalette - 12CC:01CD _tw_setrgbpalette - 12CC:012C idle _tw_setstart - 12CC:01BF idle _tw_waitvr - 2DF4:2B2E _tx - 1061:07F4 _txx1 - 1061:07FC _txx2 - 1061:07F8 _txy1 - 1061:0800 _txy2 - 2DF4:2B30 _ty - 1438:0003 _vect - 2D85:0000 _vmem - 1061:07D0 idle _xx - 1061:07D8 _xx1 - 1061:07E0 _xx2 - 1061:07D2 _yy - 1061:07D4 idle _yy1 - 1061:07DC idle _yy2 - 2DF4:2B50 __8087 - 0000:1000 idle __AHINCR - 0000:000C idle __AHSHIFT - 2DF4:2D1A __atexitcnt - 2DF4:8CBA __atexittbl - 0000:1CBC __brk - 2DF4:008B __brklvl - 2DF4:006B idle __C0argc - 2DF4:006D idle __C0argv - 2DF4:0071 idle __C0environ - 0000:1061 idle __cexit - 0000:016A __checknull - 0000:0157 __cleanup - 2DF4:2D1C __ctype - 0000:0000 Abs __cvtfak - 0000:106F idle __c_exit - 2DF4:2B64 __default87 - 2DF4:2FE6 idle __doserrno - 0000:1151 idle __DOSERROR - 2DF4:2FE8 idle __dosErrorToSV - 36C8:0000 __emu - 2DF4:0075 idle __envLng - 2DF4:0077 idle __envseg - 2DF4:0079 idle __envSize - 0000:104F __exit - 2DF4:2E1E __exitbuf - 2DF4:2E22 idle __exitfopen - 2DF4:2E26 idle __exitopen - 0000:8087 idle __floatconvert - 0000:0CE5 __fperror - 2DF4:2FE4 __fpstklen - 0000:04E9 __fpuint - 0000:211A idle __fputc - 0000:22DF __FPUTN - 2DF4:0087 __heapbase - 2DF4:008F __heaptop - 2DF4:2B6A __huge_dble - 2DF4:2B66 idle __huge_flt - 2DF4:2B72 idle __huge_ldble - 2DF4:2B7C idle __indefinite - 2DF4:005B idle __Int0Vector - 2DF4:005F idle __Int4Vector - 2DF4:0063 idle __Int5Vector - 2DF4:0067 idle __Int6Vector - 0000:1118 __IOERROR - 2DF4:2B61 __LDT - 0000:04ED __LDTRUNC - 0000:1174 __LONGTOA - 0000:0EE6 __matherr - 2DF4:2B8A __mathwhy - 0000:0293 idle __MMODEL - 2DF4:2FBA __nfile - 2DF4:2FBC __openfd - 2DF4:007D idle __osmajor - 2DF4:007E idle __osminor - 2DF4:007D idle __osversion - 0000:0D96 __POW10 - 2DF4:2B60 __protected - 2DF4:007B __psp - 0000:1D86 __REALCVT - 2DF4:30E6 __RealCvtVector - 0000:01C0 __restorezero - 0000:1CFB __sbrk - 2DF4:30EA idle __ScanTodVector - 0000:1260 __setupio - 2DF4:0081 idle __StartTime - 2DF4:3042 __stklen - 2DF4:2E2A __streams - 0000:016B __terminate - 2DF4:2B80 idle __tiny_ldble - 0000:0000 Abs __turboCvt - 0000:8087 Abs __turboFloat - 0000:11F6 idle __UTOA - 2DF4:007D __version - 0000:1332 __VPRINTER - 0000:2750 __write - 0000:0AD9 __XCVT - 0000:278C __xfflush - 2DF4:0085 idle ___brklvl - 0000:1814 idle ___first - 0000:0402 idle ___fpreset - 0000:1816 idle ___last - 0000:1818 idle ___rover - 2DF4:8D3A ___SignalPtr - 0000:25FF ___write - - Address Publics by Value - - 0000:0000 Abs __turboCvt - 0000:0000 Abs __cvtfak - 0000:000C idle __AHSHIFT - 0000:0157 __cleanup - 0000:016A __checknull - 0000:016B __terminate - 0000:01C0 __restorezero - 0000:027A _abort - 0000:0291 idle DGROUP@ - 0000:0293 idle __MMODEL - 0000:0402 idle ___fpreset - 0000:04E9 __fpuint - 0000:04ED __LDTRUNC - 0000:0632 idle FISRQQ - 0000:0AD9 __XCVT - 0000:0CE5 __fperror - 0000:0D96 __POW10 - 0000:0E32 idle FICRQQ - 0000:0E5F _pow10 - 0000:0E6A _matherr - 0000:0E94 _sin - 0000:0EE6 __matherr - 0000:0F8F F_FTOL@ - 0000:0F8F idle FTOL@ - 0000:0FBB idle _atexit - 0000:1000 idle __AHINCR - 0000:1040 _exit - 0000:104F __exit - 0000:1061 idle __cexit - 0000:106F idle __c_exit - 0000:107B F_SCOPY@ - 0000:107B idle SCOPY@ - 0000:1097 N_LXLSH@ - 0000:109A idle LXLSH@ - 0000:109A idle F_LXLSH@ - 0000:10B8 N_PADD@ - 0000:10BB idle F_PADD@ - 0000:10BB idle PADD@ - 0000:10E7 idle N_PSUB@ - 0000:10EA idle F_PSUB@ - 0000:10EA idle PSUB@ - 0000:1118 __IOERROR - 0000:1151 idle __DOSERROR - 0000:1163 _isatty - 0000:1174 __LONGTOA - 0000:11F6 idle __UTOA - 0000:1216 _lseek - 0000:123F N_PCMP@ - 0000:1260 __setupio - 0000:1332 __VPRINTER - 0000:1632 Abs FIERQQ - 0000:1814 idle ___first - 0000:1816 idle ___last - 0000:1818 idle ___rover - 0000:1954 _free - 0000:1954 idle _farfree - 0000:1A5E _malloc - 0000:1A68 idle _farmalloc - 0000:1BC5 idle _realloc - 0000:1BCC idle _farrealloc - 0000:1CBC __brk - 0000:1CFB __sbrk - 0000:1D86 __REALCVT - 0000:1D8A _setblock - 0000:1DA6 _fflush - 0000:1E73 _flushall - 0000:1EB5 _fprintf - 0000:1F53 _fseek - 0000:1FD3 idle _ftell - 0000:20B3 _memcpy - 0000:20D7 idle _setmem - 0000:20FB _memset - 0000:211A idle __fputc - 0000:2136 idle _fputc - 0000:22CB idle _fputchar - 0000:22DF __FPUTN - 0000:24E2 _setvbuf - 0000:25FF ___write - 0000:2750 __write - 0000:278C __xfflush - 0000:4000 idle FJARQQ - 0000:5C32 Abs FIDRQQ - 0000:8000 idle FJSRQQ - 0000:8087 Abs __turboFloat - 0000:8087 idle __floatconvert - 0000:A23D Abs FIWRQQ - 0000:C000 idle FJCRQQ - 0000:FE32 idle FIARQQ - 027D:0000 idle _psini - 027D:4000 idle _lsini4 - 027D:8000 idle _lsini16 - 027D:C000 _plzline - 027D:C618 _setplzparas - 027D:D48E _set_plzstart - 0FC7:000C _frame_count - 0FC7:000E _cop_drop - 0FC7:0010 _cop_pal - 0FC7:0014 _do_pal - 0FC7:0016 _cop_start - 0FC7:0018 _cop_scrl - 0FC7:001A _cop_plz - 0FC7:001C _close_copper - 0FC7:0047 _init_copper - 0FC7:00D9 idle _pompota - 0FC7:0107 idle _moveplz - 0FC7:01E8 _fadepal - 0FC7:07E8 _cop_fadepal - 1061:0000 idle _jmp_tau - 1061:07D0 idle _xx - 1061:07D2 _yy - 1061:07D4 idle _yy1 - 1061:07D8 _xx1 - 1061:07DC idle _yy2 - 1061:07E0 _xx2 - 1061:07E4 idle _ay1 - 1061:07E8 _ax1 - 1061:07EC idle _ay2 - 1061:07F0 _ax2 - 1061:07F4 _txx1 - 1061:07F8 _txy1 - 1061:07FC _txx2 - 1061:0800 _txy2 - 1061:0804 _tax1 - 1061:0808 _tay1 - 1061:080C _tax2 - 1061:0810 _tay2 - 1061:0814 _to - 1061:0818 _from - 1061:081C _dseg - 1061:081E _ctau - 1061:0824 _do_block - 1061:2584 _shadepal - 1061:2612 _do_clear - 12CC:0012 idle _scr_seg - 12CC:0014 _tw_opengraph - 12CC:0035 _tw_opengraph2 - 12CC:0062 idle _tw_clrscr - 12CC:007C idle _tw_closegraph - 12CC:0082 idle _tw_putpixel - 12CC:00BB idle _tw_getpixel - 12CC:00F2 idle _tw_setpalette - 12CC:010B idle _tw_setpalarea - 12CC:012C idle _tw_setstart - 12CC:0141 idle _tw_pictovmem - 12CC:01BF idle _tw_waitvr - 12CC:01CD _tw_setrgbpalette - 12EA:0007 _plz - 12EA:02B1 idle _init_plz - 136D:0001 _initvect - 136D:02D7 _do_poly - 136D:0C5C _clear - 1438:0003 _vect - 1438:00B4 idle _calculate - 1438:0177 idle _count_const - 1438:043C idle _rotate - 1438:0556 idle _sort_faces - 1438:079F idle _draw - 1438:08C5 idle _swappage - 14D7:0009 _main - 14DA:0000 idle _dis_version - 14DA:0023 idle _dis_waitb - 14DA:0040 _dis_partstart - 14DA:005A _dis_exit - 14DA:0060 idle _dis_indemo - 14DA:0066 idle _dis_msgarea - 14DA:0073 idle _dis_muscode - 14DA:0080 _dis_musplus - 14DA:008F idle _dis_musrow - 14DA:009B idle _dis_setcopper - 14DA:00AE _dis_setmframe - 14DA:00BE _dis_getmframe - 14DA:00CA idle _dis_sync - 14E7:1084 _getspl - 160F:2152 e086_Entry - 160F:26E0 e086_Shortcut - 1887:0306 e087_Entry - 1887:03C6 e087_Shortcut - 1887:0430 e087_Trap - 18E4:0000 _kuva1 - 1CE4:0000 _dist1 - 24E4:0000 _kuva2 - 28E4:0000 _kuva3 - 2CE4:0000 _sinit - 2CE4:0200 _kosinit - 2D85:0000 _vmem - 2D85:0004 idle _buu - 2DC4:0000 idle _fpal - 2DF4:0000 idle DATASEG@ - 2DF4:005B idle __Int0Vector - 2DF4:005F idle __Int4Vector - 2DF4:0063 idle __Int5Vector - 2DF4:0067 idle __Int6Vector - 2DF4:006B idle __C0argc - 2DF4:006D idle __C0argv - 2DF4:0071 idle __C0environ - 2DF4:0075 idle __envLng - 2DF4:0077 idle __envseg - 2DF4:0079 idle __envSize - 2DF4:007B __psp - 2DF4:007D idle __osversion - 2DF4:007D idle __osmajor - 2DF4:007D __version - 2DF4:007E idle __osminor - 2DF4:007F _errno - 2DF4:0081 idle __StartTime - 2DF4:0085 idle ___brklvl - 2DF4:0087 __heapbase - 2DF4:008B __brklvl - 2DF4:008F __heaptop - 2DF4:0094 idle _ptau - 2DF4:0194 idle _curpal - 2DF4:0196 idle _timetable - 2DF4:01AA idle _ttptr - 2DF4:01AC _l1 - 2DF4:01AE _l2 - 2DF4:01B0 _l3 - 2DF4:01B2 _l4 - 2DF4:01B4 _k1 - 2DF4:01B6 _k2 - 2DF4:01B8 _k3 - 2DF4:01BA _k4 - 2DF4:01BC _il1 - 2DF4:01BE _il2 - 2DF4:01C0 _il3 - 2DF4:01C2 _il4 - 2DF4:01C4 _ik1 - 2DF4:01C6 _ik2 - 2DF4:01C8 _ik3 - 2DF4:01CA _ik4 - 2DF4:01CC idle _inittable - 2DF4:026C idle _clrptr - 2DF4:026E idle _kuvataus - 2DF4:0276 idle _disttaus - 2DF4:02A2 idle _object - 2DF4:2B0C idle _polys - 2DF4:2B0E idle _light_src - 2DF4:2B1A idle _lls - 2DF4:2B26 _kx - 2DF4:2B28 _ky - 2DF4:2B2A _kz - 2DF4:2B2C _dis - 2DF4:2B2E _tx - 2DF4:2B30 _ty - 2DF4:2B32 _ls_kx - 2DF4:2B34 _ls_ky - 2DF4:2B36 _ls_kz - 2DF4:2B38 idle _ls_x - 2DF4:2B3A idle _ls_y - 2DF4:2B3C idle _ls_z - 2DF4:2B3E idle _page - 2DF4:2B40 idle _frames - 2DF4:2B50 __8087 - 2DF4:2B60 __protected - 2DF4:2B61 __LDT - 2DF4:2B64 __default87 - 2DF4:2B66 idle __huge_flt - 2DF4:2B6A __huge_dble - 2DF4:2B72 idle __huge_ldble - 2DF4:2B7C idle __indefinite - 2DF4:2B80 idle __tiny_ldble - 2DF4:2B8A __mathwhy - 2DF4:2D1A __atexitcnt - 2DF4:2D1C __ctype - 2DF4:2E1E __exitbuf - 2DF4:2E22 idle __exitfopen - 2DF4:2E26 idle __exitopen - 2DF4:2E2A __streams - 2DF4:2FBA __nfile - 2DF4:2FBC __openfd - 2DF4:2FE4 __fpstklen - 2DF4:2FE6 idle __doserrno - 2DF4:2FE8 idle __dosErrorToSV - 2DF4:3042 __stklen - 2DF4:30E6 __RealCvtVector - 2DF4:30EA idle __ScanTodVector - 2DF4:3108 idle _pals - 2DF4:5508 idle _clrtau - 2DF4:7508 _pal - 2DF4:7808 idle _siny - 2DF4:7888 idle _sinx - 2DF4:7908 idle _sini - 2DF4:88A8 idle _czz - 2DF4:88AA idle _czy - 2DF4:88AC idle _czx - 2DF4:88AE idle _cyz - 2DF4:88B0 idle _cyy - 2DF4:88B2 idle _cyx - 2DF4:88B4 idle _cxz - 2DF4:88B6 idle _cxy - 2DF4:88B8 idle _cxx - 2DF4:88BA idle _ptodraw - 2DF4:8CBA __atexittbl - 2DF4:8D3A ___SignalPtr - 36C8:0000 __emu - -Program entry point at 0000:0000 - diff --git a/PLZPART/TWEAK.H b/PLZPART/TWEAK.H index 07b36c4..5722bf1 100755 --- a/PLZPART/TWEAK.H +++ b/PLZPART/TWEAK.H @@ -1,4 +1,9 @@ +#define far +#define MK_FP(x,y) ((void *)x) +#define FP_SEG(x) (x) + extern void tw_opengraph(); +extern void tw_opengraph2(); extern void tw_closegraph(); extern void tw_putpixel(int x, int y, int color); extern int tw_getpixel(int x, int y); @@ -9,4 +14,4 @@ extern void tw_setstart(int start); extern void tw_pictovmem(void far *pic, int to, int len); extern void tw_crlscr(); -extern int far scr_seg; \ No newline at end of file +extern int far scr_seg; diff --git a/PLZPART/TWEAK.OBJ b/PLZPART/TWEAK.OBJ deleted file mode 100755 index eb8059f7fae1d9e234228cbafffa25910ee06fcf..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2733 zcmZ`*4|G#^75=`wG)+VL4`?Z+wqx&ifL0^x!->@0WY; z_ucQ_`#Zn)OEyeGl3MGuFE6lHRh$at1IST30;^l|?d|RUwX2)`f&Ba$f1tgowI#o( zVByYCI&2p@I-TV=(h5V0#9ZA5;6csYv%NbVmYAwfb*@m24tI$&ZAT)?|44(vySuGO z@RitAyHQ(S(Ez}hz|?LtOeJMrceN+H(+JZ?hLzi<0!;P=*ZEr8{4I@v`nCs6z}uk& z*iPkO@wO=fTQ#_?BiPpTkiR(yM07Mm&=d`A_XpeRoBhF{{|xX=9oMr3Zx7Z7g1JPB zj_Re`ni_(woooGTi-@OnSQl?-Zf*C+T5AE4bv#{)TeRZq>YIX{fnMSZI+i6^`nARa zjjONqwx4L!DSCQCbD+H;paLU0rk9S-RUh!zU;Ws*8f9*6SM~ur{x@6S(!x2wV>+HH z&6#~tQ?{+q2&Bdk3(7-A*q-I%n)_EHoFOx8qggOvUP35I%;|D=ZWXp>XKOZ-LzBdw zA@(eJtT8Vq<{6O~^F9&th@_a88}kxi44Gg%%OYllQeYc1+H9_cqR#s{q6Z4KKs)>N zK#>;M%$<5*krsHK8?=7U^$HLZ)eJepV~HZ_c6(yFeL|WLi%IwM;aK8+ZVpX`?fit- zL_7V3+m|TdRGB^lNyvm1(~yiTq+vQHBO6mOL!vq2<%*RjYd&V;7WvG=ZL&?XF%NTa zhph8)Cko{ANi4(y6v}#+te-*=?#3c45$_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#include #include -#include +//#include #include #include "tweak.h" +#include "../dis/dis.h" #define SX sinit[kx] #define SY sinit[ky] @@ -16,11 +17,11 @@ extern far char (* far vmem)[160]; extern char far pal[768]; -extern clear(); -extern init(); -extern shadepal(char far *fpal, char far *ppal, int shade); -extern init_copper(); -extern close_copper(); +extern void clear(); +//extern init(); +extern void shadepal(char far *fpal, char far *ppal, int shade); +extern int init_copper(); +extern int close_copper(); extern int far cop_rotatev; extern far int frame_count; extern far char * far cop_pal; @@ -107,13 +108,21 @@ int ls_kx=0,ls_ky=0,ls_kz=0,ls_x=0,ls_y=0,ls_z=128; int page=0; int frames=0; -vect() +void sort_faces(void); +void draw(int); +void swappage(void); +void rotate(void); +void count_const(void); +void calculate(int); + +void vect() { - int c=0,a; + int /*c=0,*/a; tw_opengraph(); - while(dis_musplus()<13 && !dis_exit()); frame_count=0; + //while(dis_musplus()<13 && !dis_exit()); + frame_count=0; while(!dis_exit()) { a=dis_musplus(); @@ -129,10 +138,10 @@ vect() // tw_closegraph(); } -calculate(int k) +void calculate(int k) { - int a; - static int px=0,py=256; + //int a; + //static int px=0,py=256; getspl(4*256+frames*4); kx=kx&1023; @@ -150,7 +159,7 @@ calculate(int k) sort_faces(); } -count_const() +void count_const() { //matrix equations: //X Y Z -> nX @@ -163,31 +172,31 @@ count_const() //12=Xcos*Zcos*Ysin 14=Xcos*Ysin*Zsin 16=Ycos*Xcos // +Xsin*Zsin -Xsin*Zcos - cxx=(long)CY*(long)CZ>>15+7; - cxy=(long)CY*(long)SZ>>15+7; - cxz=-(long)SY>>7; + cxx=CY*CZ>>(15+7); + cxy=CY*SZ>>(15+7); + cxz=-SY>>7; - cyx=((long)SX*(long)CZ+16384L>>15)*(long)SY - (long)CX*(long)SZ>>15+7; - cyy=((long)SX*(long)SY+16384L>>15)*(long)SZ + (long)CX*(long)CZ>>15+7; - cyz=(long)CY*(long)SX>>15+7; + cyx=(((SX*CZ+16384L)>>15)*SY - CX*SZ)>>(15+7); + cyy=(((SX*SY+16384L)>>15)*SZ + CX*CZ)>>(15+7); + cyz=CY*SX>>(15+7); - czx=((long)CX*(long)CZ+16384L>>15)*(long)SY + (long)SX*(long)SZ>>15+7; - czy=((long)CX*(long)SY+16384L>>15)*(long)SZ - (long)SX*(long)CZ>>15+7; - czz=(long)CY*(long)CX>>15+7; + czx=(((CX*CZ+16384L)>>15)*SY + SX*SZ)>>(15+7); + czy=(((CX*SY+16384L)>>15)*SZ - SX*CZ)>>(15+7); + czz=CY*CX>>(15+7); } -rotate() +void rotate() { - int a,b,x,y,z,xx,yy,zz; + int a,/*b,*/x,y,z,xx,yy,zz; for(a=0;a>1) + (y*cxy>>1) + (z*cxz>>1)>>7)+tx; - object.point[a].yy=yy=((x*cyx>>1) + (y*cyy>>1) + (z*cyz>>1)>>7)+ty; - object.point[a].zz=zz=((x*czx>>1) + (y*czy>>1) + (z*czz>>1)>>7)+dis; + object.point[a].xx=xx=(((x*cxx>>1) + (y*cxy>>1) + (z*cxz>>1))>>7)+tx; + object.point[a].yy=yy=(((x*cyx>>1) + (y*cyy>>1) + (z*cyz>>1))>>7)+ty; + object.point[a].zz=zz=(((x*czx>>1) + (y*czy>>1) + (z*czz>>1))>>7)+dis; /* 1000,1000,1000 @@ -200,10 +209,10 @@ rotate() } } -sort_faces() +void sort_faces() { - int a=0,b,c,x,y,z,p=0; - long ax,ay,az,bx,by,bz,kx,ky,kz,nx,ny,nz,s,l; + int a=0,/*b,*/c,x,y,z,p=0; + long ax,ay,az,bx,by,bz,/*kx,ky,kz,*/nx,ny,nz,s/*,l*/; while(a + + +uint16_t psini_read16(int); +uint8_t psini_read8(int); +void psini_write16(int, uint16_t); +void psini_write8(int, uint8_t); + +void vga_select_bitplanes_02(void); +void vga_select_bitplanes_13(void); +void vga_select_bitplanes_0123(void); +void vga_write32(int, int); +void vga_set_line_compare(int); +void vga_set_palette_entry(int, int, int, int); +void vga_show_framebuffer(void); +void vga_set_hscroll_offset(int); +void vga_upload_palette(uint8_t *); + +void initvect(void); + +int init_copper(void); +int close_copper(void); +void copper1(void); +void copper2(void); diff --git a/PLZPART/copper.c b/PLZPART/copper.c new file mode 100755 index 0000000..836fa7e --- /dev/null +++ b/PLZPART/copper.c @@ -0,0 +1,204 @@ +/* + * Written by Nick Kovac with minor changes by Claudio Matsuoka + */ + +#include "common.h" + +int frame_count = 0; +int cop_drop = 0; +uint8_t *cop_pal; +int do_pal = 0; +int cop_start = 0; +int cop_scrl = 0; +int cop_plz = 1; + +static int dtau[65]; + +uint8_t fadepal[768 * 2]; +uint8_t *cop_fadepal; + +extern int l1, l2, l3, l4; +extern int k1, k2, k3, k4; +extern int il1, il2, il3, il4; +extern int ik1, ik2, ik3, ik4; +extern int ttptr; + + +void pompota(void); +void moveplz(void); +void do_drop(void); +void initpparas(void); + + +int init_copper() +{ + int ccc; + + for (ccc = 0; ccc < 65; ccc++) { + dtau[ccc] = ccc * ccc / 4 * 43 / 128 + 60; + } + + return 0; +} + +int close_copper() +{ + return 0; +} + +// [nk] just before retrace +void copper1() +{ + // There is also assembly code to set the first pixel of + // display memory here, but it may not be necessary. + + vga_set_hscroll_offset(cop_scrl); +} + +// [nk] in retrace +void copper2() +{ + // [nk] Don't think this is used. + frame_count++; + + if (do_pal != 0) { + do_pal = 0; + vga_upload_palette(cop_pal); + } + + pompota(); + moveplz(); + + if (cop_drop != 0) + { + do_drop(); + } +} + +void pompota() +{ + + // [NK 18/1/2014] Disable this for now, as it looks a bit jittery. + return; + +#if 0 + // [NK] This function toggles the horizontal split point every frame + // [NK] between line 60 and 61, and toggles the horizontal offset between 0 and 4. + // [NK] I think the original intention of this code was to give more variation + // [NK] cheaply, almost like a cheap alpha blend between two plasmas, but + // [NK] it seems to cause a lot of flicker in the port. Perhaps more precise timing is + // [NK] required to give the original effect? In any case I disabled this code + // [NK] temporarily. + + vga_set_line_compare(60); + cop_scrl = 4; + + pompi++; + + if ((pompi & 1) != 0) + { + // [NK 12/1/2014] Moving the starting line up and down each alternate frame + // [NK 12/1/2014] doesn't look good in windowed mode. + // [NK 13/1/2014] Seems to work okay in fullscreen mode though. + vga_set_line_compare(61); + cop_scrl = 0; + } +#endif +} + +void moveplz() +{ + k1 += -3; + k1 &= 4095; + k2 += -2; + k2 &= 4095; + k3 += 1; + k3 &= 4095; + k4 += 2; + k4 &= 4095; + + l1 += -1; + l1 &= 4095; + l2 += -2; + l2 &= 4095; + l3 += 2; + l3 &= 4095; + l4 += 3; + l4 &= 4095; +} + +void do_drop() +{ + cop_drop++; + + if (cop_drop <= 64) { + vga_set_line_compare(dtau[cop_drop]); + } else { + //@@over + + int bShouldFade = 0; + + if (cop_drop >= 256) { + } else if (cop_drop >= 128) { + bShouldFade = 1; + } else if (cop_drop > 96) { + } else /*if (cop_drop > 64) */{ + bShouldFade = 1; + } + + if (bShouldFade) { + cop_pal = fadepal; + do_pal = 1; + + if (cop_drop == 65) { + vga_set_line_compare(400); + initpparas(); + } else { + int i, ccc; + + vga_set_line_compare(60); + + // [NK 9/1/2014] Fade the palette using 8.8 fixed point numbers. + + uint8_t* pcop_fadepal = cop_fadepal; + uint8_t* pfadepal = fadepal; + + for (i = 0; i < (768 / 16); i++) { + for (ccc = 0; ccc < 16; ccc++) { + uint8_t al = pcop_fadepal[ccc*2]; + uint8_t ah = pcop_fadepal[(ccc*2) + 1]; + + uint8_t oldval = pfadepal[ccc + 768]; + pfadepal[ccc + 768] += al; + uint8_t newval = pfadepal[ccc + 768]; + uint8_t carry = 0; + if (newval < oldval) { + carry = 1; + } + + pfadepal[ccc] += ah + carry; + } + + pcop_fadepal += 32; + pfadepal += 16; + } + } + } else { + cop_drop = 0; + } + } +} + +void initpparas() +{ + l1 = il1; + l2 = il2; + l3 = il3; + l4 = il4; + + k1 = ik1; + k2 = ik2; + k3 = ik3; + k4 = ik4; +} + diff --git a/PLZPART/opengl.c b/PLZPART/opengl.c new file mode 100755 index 0000000..f8eca9b --- /dev/null +++ b/PLZPART/opengl.c @@ -0,0 +1,153 @@ +#include +#include +#include +#include +#include +#include "u2gl.h" +#include "opengl.h" + +static int view_width; +static int view_height; + +static struct u2gl_program bg_program; + +float obj[9]; + +float bg_obj[12] = { + 0.0f, 0.0f, 0.0f, + 320.0f, 0.0f, 0.0f, + 0.0f, 200.0f, 0.0f, + 320.0f, 200.0f, 0.0f +}; + +static const char vertex_shader_texture[] = +"uniform mat4 pMatrix;\n" +"uniform mat4 uMatrix;\n" +"attribute vec4 aPosition;\n" +"varying vec3 vPosition;\n" +"attribute vec2 aTexPosition;\n" +"varying vec2 vTexPosition;\n" +"\n" +"void main() {\n" +" mat4 Matrix = pMatrix * uMatrix;\n" +" vec4 position = Matrix * aPosition;\n" +" gl_Position = position;\n" +" vTexPosition = aTexPosition;\n" +" vPosition = vec3(position);\n" +"}\n"; + +static const char fragment_shader_texture[] = +"precision mediump float;\n" +"uniform sampler2D uTexture;\n" +"uniform vec4 uColor;\n" +"varying vec3 vPosition;\n" +"varying vec2 vTexPosition;\n" +"\n" +"void main() {\n" +" gl_FragColor = texture2D(uTexture, vTexPosition);\n" +"}\n"; + + +int uTime_location; +int uPos_location; +int uTexPos_location; +int uRadius_location; +int uLensTex_location; +int uRotTex_location; + +static float tex_coords[] = { + 0.0f, 1.0f, + 1.0f, 1.0f, + 0.0f, 0.0f, + 1.0f, 0.0f +}; + +static float color[256][4]; + +unsigned char *image; + + +#define CC 32 + +void setrgb(int c, int r, int g, int b) +{ + float alpha = 0.5f; + + color[c][0] = (float)r / CC; + color[c][1] = (float)g / CC; + color[c][2] = (float)b / CC; + color[c][3] = alpha; +} + +void getrgb(int c, char *p) +{ + p[0] = color[c][0] * CC; + p[1] = color[c][1] * CC; + p[2] = color[c][2] * CC; +} + +void draw_bg() +{ + //glActiveTexture(GL_TEXTURE0); + glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 320, 400, GL_RGB, + GL_UNSIGNED_BYTE, image); + glUseProgram(bg_program.program); + u2gl_draw_textured_triangle_strip(&bg_program, bg_obj, 4); +} + +static void init_texture() +{ + GLuint tex[3]; + + u2gl_set_tex_coords(tex_coords); + + glGenTextures(1, tex); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, tex[0]); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + + image = calloc(3, 320 * 400); + + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 320, 400, 0, GL_RGB, + GL_UNSIGNED_BYTE, image); + glGenerateMipmap(GL_TEXTURE_2D); + u2gl_check_error("init_texture 1"); +} + + +int init_opengl() +{ + GLuint v, f; + + view_width = 320; + view_height = 200; + + v = u2gl_compile_vertex_shader(vertex_shader_texture); + f = u2gl_compile_fragment_shader(fragment_shader_texture); + u2gl_create_program(&bg_program, f, v); + u2gl_check_error("create program bg"); + + glDisable(GL_DEPTH_TEST); + glEnable(GL_BLEND); + + //glBlendFunc(GL_SRC_ALPHA, GL_ONE); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + glClearColor(.0, .0, .0, 0); + u2gl_check_error("init_opengl"); + + init_texture(); + u2gl_check_error("init_texture"); + + u2gl_projection(0, view_width, 0, view_height, &bg_program); + + return 0; +} + +void clear_screen() +{ + glClear(GL_COLOR_BUFFER_BIT); +} diff --git a/PLZPART/opengl.h b/PLZPART/opengl.h new file mode 100755 index 0000000..1ee399c --- /dev/null +++ b/PLZPART/opengl.h @@ -0,0 +1,4 @@ + +int init_opengl(void); +void clear_screen(void); +void draw_bg(void); diff --git a/PLZPART/plza.c b/PLZPART/plza.c new file mode 100755 index 0000000..a9e434b --- /dev/null +++ b/PLZPART/plza.c @@ -0,0 +1,38 @@ + + +int xx; +int yy; +int yy1; +int xx1; +int yy2; +int xx2; +int ay1; +int ax1; +int ay2; +int ax2; +int txx1; +int txy1; +int txx2; +int txy2; +int tax1; +int tay1; +int tax2; +int tay2; +int to = 0x0a0000000; +int from; +int dseg = 0; +int ctau; + +void do_block(int ycnt) +{ +} + +void shadepal(char *fpal, char *ppal, int shade) +{ +} + +int ycnt = 0; + +void do_clear(char *vmem, int *otau, int *ntau) +{ +} diff --git a/PLZPART/sinit.c b/PLZPART/sinit.c new file mode 100755 index 0000000..a4ef28a --- /dev/null +++ b/PLZPART/sinit.c @@ -0,0 +1,167 @@ + +unsigned char sinit[] = { + 0,0,201,0,146,1,91,2,36,3,237,3,182,4,127, + 5,72,6,17,7,217,7,162,8,106,9,51,10,251,10,195, + 11,140,12,84,13,28,14,227,14,171,15,114,16,58,17,1, + 18,200,18,143,19,85,20,28,21,226,21,168,22,109,23,51, + 24,248,24,189,25,130,26,71,27,11,28,207,28,147,29,86, + 30,25,31,220,31,159,32,97,33,35,34,229,34,166,35,103, + 36,39,37,232,37,168,38,103,39,38,40,229,40,163,41,97, + 42,31,43,220,43,152,44,85,45,16,46,204,46,135,47,65, + 48,251,48,181,49,110,50,38,51,222,51,150,52,77,53,3, + 54,185,54,111,55,36,56,216,56,140,57,63,58,242,58,164, + 59,86,60,7,61,183,61,103,62,22,63,197,63,115,64,32, + 65,205,65,121,66,37,67,208,67,122,68,35,69,204,69,116, + 70,28,71,195,71,105,72,14,73,179,73,87,74,250,74,157, + 75,63,76,224,76,128,77,32,78,191,78,93,79,250,79,151, + 80,51,81,206,81,104,82,1,83,154,83,50,84,201,84,95, + 85,244,85,137,86,29,87,175,87,65,88,211,88,99,89,242, + 89,129,90,15,91,156,91,40,92,179,92,61,93,198,93,79, + 94,214,94,93,95,226,95,103,96,235,96,110,97,239,97,112, + 98,240,98,112,99,238,99,107,100,231,100,98,101,220,101,86, + 102,206,102,69,103,187,103,49,104,165,104,24,105,138,105,252, + 105,108,106,219,106,73,107,182,107,34,108,142,108,248,108,96, + 109,200,109,47,110,149,110,250,110,93,111,192,111,33,112,130, + 112,225,112,63,113,156,113,248,113,83,114,173,114,6,115,94, + 115,180,115,10,116,94,116,177,116,3,117,84,117,164,117,242, + 117,64,118,140,118,215,118,34,119,106,119,178,119,249,119,62, + 120,131,120,198,120,8,121,73,121,136,121,199,121,4,122,64, + 122,123,122,181,122,237,122,37,123,91,123,144,123,196,123,247, + 123,40,124,88,124,135,124,181,124,226,124,13,125,56,125,97, + 125,136,125,175,125,212,125,249,125,28,126,61,126,94,126,125, + 126,155,126,184,126,212,126,238,126,8,127,32,127,54,127,76, + 127,96,127,115,127,133,127,150,127,165,127,179,127,192,127,204, + 127,215,127,224,127,232,127,239,127,244,127,248,127,252,127,253, + 127,254,127,253,127,252,127,248,127,244,127,239,127,232,127,224, + 127,215,127,204,127,192,127,179,127,165,127,150,127,133,127,115, + 127,96,127,76,127,54,127,32,127,8,127,238,126,212,126,184, + 126,155,126,125,126,94,126,61,126,28,126,249,125,212,125,175, + 125,136,125,97,125,56,125,13,125,226,124,181,124,135,124,88, + 124,40,124,247,123,196,123,144,123,91,123,37,123,237,122,181, + 122,123,122,64,122,4,122,199,121,136,121,73,121,8,121,198, + 120,131,120,62,120,249,119,178,119,106,119,34,119,215,118,140, + 118,64,118,242,117,164,117,84,117,3,117,177,116,94,116,10, + 116,180,115,94,115,6,115,173,114,83,114,248,113,156,113,63, + 113,225,112,130,112,33,112,192,111,93,111,250,110,149,110,47, + 110,200,109,96,109,248,108,142,108,34,108,182,107,73,107,219, + 106,108,106,252,105,138,105,24,105,165,104,49,104,187,103,69, + 103,206,102,86,102,220,101,98,101,231,100,107,100,238,99,112, + 99,240,98,112,98,239,97,110,97,235,96,103,96,226,95,93, + 95,214,94,79,94,198,93,61,93,179,92,40,92,156,91,15, + 91,129,90,242,89,99,89,211,88,65,88,175,87,29,87,137, + 86,244,85,95,85,201,84,50,84,154,83,1,83,104,82,206, + 81,51,81,151,80,250,79,93,79,191,78,32,78,128,77,224, + 76,63,76,157,75,250,74,87,74,179,73,14,73,105,72,195, + 71,28,71,116,70,204,69,35,69,122,68,208,67,37,67,121, + 66,205,65,32,65,115,64,197,63,22,63,103,62,183,61,7, + 61,86,60,164,59,242,58,63,58,140,57,216,56,36,56,111, + 55,185,54,3,54,77,53,150,52,222,51,38,51,110,50,181, + 49,251,48,65,48,135,47,204,46,16,46,85,45,152,44,220, + 43,31,43,97,42,163,41,229,40,38,40,103,39,168,38,232, + 37,39,37,103,36,166,35,229,34,35,34,97,33,159,32,220, + 31,25,31,86,30,147,29,207,28,11,28,71,27,130,26,189, + 25,248,24,51,24,109,23,168,22,226,21,28,21,85,20,143, + 19,200,18,1,18,58,17,114,16,171,15,227,14,28,14,84, + 13,140,12,195,11,251,10,51,10,106,9,162,8,217,7,17, + 7,72,6,127,5,182,4,237,3,36,3,91,2,146,1,201, + 0,0,0,56,255,111,254,166,253,221,252,20,252,75,251,130, + 250,185,249,240,248,40,248,95,247,151,246,206,245,6,245,62, + 244,117,243,173,242,229,241,30,241,86,240,143,239,199,238,0, + 238,57,237,114,236,172,235,229,234,31,234,89,233,148,232,206, + 231,9,231,68,230,127,229,186,228,246,227,50,227,110,226,171, + 225,232,224,37,224,98,223,160,222,222,221,28,221,91,220,154, + 219,218,218,25,218,89,217,154,216,219,215,28,215,94,214,160, + 213,226,212,37,212,105,211,172,210,241,209,53,209,122,208,192, + 207,6,207,76,206,147,205,219,204,35,204,107,203,180,202,254, + 201,72,201,146,200,221,199,41,199,117,198,194,197,15,197,93, + 196,171,195,250,194,74,194,154,193,235,192,60,192,142,191,225, + 190,52,190,136,189,220,188,49,188,135,187,222,186,53,186,141, + 185,229,184,62,184,152,183,243,182,78,182,170,181,7,181,100, + 180,194,179,33,179,129,178,225,177,66,177,164,176,7,176,106, + 175,206,174,51,174,153,173,0,173,103,172,207,171,56,171,162, + 170,13,170,120,169,228,168,82,168,192,167,46,167,158,166,15, + 166,128,165,242,164,101,164,217,163,78,163,196,162,59,162,178, + 161,43,161,164,160,31,160,154,159,22,159,147,158,18,158,145, + 157,17,157,145,156,19,156,150,155,26,155,159,154,37,154,171, + 153,51,153,188,152,70,152,208,151,92,151,233,150,119,150,5, + 150,149,149,38,149,184,148,75,148,223,147,115,147,9,147,161, + 146,57,146,210,145,108,145,7,145,164,144,65,144,224,143,127, + 143,32,143,194,142,101,142,9,142,174,141,84,141,251,140,163, + 140,77,140,247,139,163,139,80,139,254,138,173,138,93,138,15, + 138,193,137,117,137,42,137,223,136,151,136,79,136,8,136,195, + 135,126,135,59,135,249,134,184,134,121,134,58,134,253,133,193, + 133,134,133,76,133,20,133,220,132,166,132,113,132,61,132,10, + 132,217,131,169,131,122,131,76,131,31,131,244,130,201,130,160, + 130,121,130,82,130,45,130,8,130,229,129,196,129,163,129,132, + 129,102,129,73,129,45,129,19,129,249,128,225,128,203,128,181, + 128,161,128,142,128,124,128,107,128,92,128,78,128,65,128,53, + 128,42,128,33,128,25,128,18,128,13,128,9,128,5,128,4, + 128,3,128,4,128,5,128,9,128,13,128,18,128,25,128,33, + 128,42,128,53,128,65,128,78,128,92,128,107,128,124,128,142, + 128,161,128,181,128,203,128,225,128,249,128,19,129,45,129,73, + 129,102,129,132,129,163,129,196,129,229,129,8,130,45,130,82, + 130,121,130,160,130,201,130,244,130,31,131,76,131,122,131,169, + 131,217,131,10,132,61,132,113,132,166,132,220,132,20,133,76, + 133,134,133,193,133,253,133,58,134,121,134,184,134,249,134,59, + 135,126,135,195,135,8,136,79,136,151,136,223,136,42,137,117, + 137,193,137,15,138,93,138,173,138,254,138,80,139,163,139,247, + 139,77,140,163,140,251,140,84,141,174,141,9,142,101,142,194, + 142,32,143,127,143,224,143,65,144,164,144,7,145,108,145,210, + 145,57,146,161,146,9,147,115,147,223,147,75,148,184,148,38, + 149,149,149,5,150,119,150,233,150,92,151,208,151,70,152,188, + 152,51,153,171,153,37,154,159,154,26,155,150,155,19,156,145, + 156,17,157,145,157,18,158,147,158,22,159,154,159,31,160,164, + 160,43,161,178,161,59,162,196,162,78,163,217,163,101,164,242, + 164,128,165,15,166,158,166,46,167,192,167,82,168,228,168,120, + 169,13,170,162,170,56,171,207,171,103,172,0,173,153,173,51, + 174,206,174,106,175,7,176,164,176,66,177,225,177,129,178,33, + 179,194,179,100,180,7,181,170,181,78,182,243,182,152,183,62, + 184,229,184,141,185,53,186,222,186,135,187,49,188,220,188,136, + 189,52,190,225,190,142,191,60,192,235,192,154,193,74,194,250, + 194,171,195,93,196,15,197,194,197,117,198,41,199,221,199,146, + 200,72,201,254,201,180,202,107,203,35,204,219,204,147,205,76, + 206,6,207,192,207,122,208,53,209,241,209,172,210,105,211,37, + 212,226,212,160,213,94,214,28,215,219,215,154,216,89,217,25, + 218,218,218,154,219,91,220,28,221,222,221,160,222,98,223,37, + 224,232,224,171,225,110,226,50,227,246,227,186,228,127,229,68, + 230,9,231,206,231,148,232,89,233,31,234,229,234,172,235,114, + 236,57,237,0,238,199,238,143,239,86,240,30,241,229,241,173, + 242,117,243,62,244,6,245,206,245,151,246,95,247,40,248,240, + 248,185,249,130,250,75,251,20,252,221,252,166,253,111,254,56, + 255, + 0,0,201,0,146,1,91,2,36,3,237,3,182,4,127, + 5,72,6,17,7,217,7,162,8,106,9,51,10,251,10,195, + 11,140,12,84,13,28,14,227,14,171,15,114,16,58,17,1, + 18,200,18,143,19,85,20,28,21,226,21,168,22,109,23,51, + 24,248,24,189,25,130,26,71,27,11,28,207,28,147,29,86, + 30,25,31,220,31,159,32,97,33,35,34,229,34,166,35,103, + 36,39,37,232,37,168,38,103,39,38,40,229,40,163,41,97, + 42,31,43,220,43,152,44,85,45,16,46,204,46,135,47,65, + 48,251,48,181,49,110,50,38,51,222,51,150,52,77,53,3, + 54,185,54,111,55,36,56,216,56,140,57,63,58,242,58,164, + 59,86,60,7,61,183,61,103,62,22,63,197,63,115,64,32, + 65,205,65,121,66,37,67,208,67,122,68,35,69,204,69,116, + 70,28,71,195,71,105,72,14,73,179,73,87,74,250,74,157, + 75,63,76,224,76,128,77,32,78,191,78,93,79,250,79,151, + 80,51,81,206,81,104,82,1,83,154,83,50,84,201,84,95, + 85,244,85,137,86,29,87,175,87,65,88,211,88,99,89,242, + 89,129,90,15,91,156,91,40,92,179,92,61,93,198,93,79, + 94,214,94,93,95,226,95,103,96,235,96,110,97,239,97,112, + 98,240,98,112,99,238,99,107,100,231,100,98,101,220,101,86, + 102,206,102,69,103,187,103,49,104,165,104,24,105,138,105,252, + 105,108,106,219,106,73,107,182,107,34,108,142,108,248,108,96, + 109,200,109,47,110,149,110,250,110,93,111,192,111,33,112,130, + 112,225,112,63,113,156,113,248,113,83,114,173,114,6,115,94, + 115,180,115,10,116,94,116,177,116,3,117,84,117,164,117,242, + 117,64,118,140,118,215,118,34,119,106,119,178,119,249,119,62, + 120,131,120,198,120,8,121,73,121,136,121,199,121,4,122,64, + 122,123,122,181,122,237,122,37,123,91,123,144,123,196,123,247, + 123,40,124,88,124,135,124,181,124,226,124,13,125,56,125,97, + 125,136,125,175,125,212,125,249,125,28,126,61,126,94,126,125, + 126,155,126,184,126,212,126,238,126,8,127,32,127,54,127,76, + 127,96,127,115,127,133,127,150,127,165,127,179,127,192,127,204, + 127,215,127,224,127,232,127,239,127,244,127,248,127,252,127,253, + 127,254,127,253,127,252,127,248,127,244,127,239,127,232,127,224 +}; + +unsigned char *kosinit = sinit + 512; diff --git a/PLZPART/spline.c b/PLZPART/spline.c new file mode 100755 index 0000000..ae14450 --- /dev/null +++ b/PLZPART/spline.c @@ -0,0 +1,7 @@ + + + +int getspl(int where) +{ + return 0; +} diff --git a/PLZPART/tweak.c b/PLZPART/tweak.c new file mode 100755 index 0000000..de1808e --- /dev/null +++ b/PLZPART/tweak.c @@ -0,0 +1,15 @@ +#include "common.h" +#include "tweak.h" + +void tw_opengraph() +{ +} + +void tw_opengraph2() +{ +} + +void tw_setrgbpalette(int pal, int r, int g, int b) +{ + vga_set_palette_entry(pal, r, g, b); +} diff --git a/PLZPART/vga.c b/PLZPART/vga.c new file mode 100755 index 0000000..28b91b6 --- /dev/null +++ b/PLZPART/vga.c @@ -0,0 +1,126 @@ +/* + * Written by Nick Kovac with minor changes by Claudio Matsuoka + */ + +#include +#include "common.h" + +static int plane_select[4] = { 0, 0, 0, 0 }; +static int line_compare = 0; +static int hscroll_offset = 0; +static uint8_t palette[256 * 3]; + +#define SCREEN_WIDTH 320 +#define SCREEN_HEIGHT 400 +#define FRAME_BUFFER_WIDTH 384 +#define FRAME_BUFFER_HEIGHT 400 + +uint8_t fb[FRAME_BUFFER_WIDTH * FRAME_BUFFER_HEIGHT]; + + +void vga_select_bitplanes_02() +{ + plane_select[0] = 1; + plane_select[1] = 0; + plane_select[2] = 1; + plane_select[3] = 0; +} + +void vga_select_bitplanes_13() +{ + plane_select[0] = 0; + plane_select[1] = 1; + plane_select[2] = 0; + plane_select[3] = 1; +} + +void vga_select_bitplanes_0123() +{ + plane_select[0] = 1; + plane_select[1] = 1; + plane_select[2] = 1; + plane_select[3] = 1; +} + +void vga_write32(int offset, int val) +{ + int i, j; + + // For each selected plane, calculate 4 pixel offsets and write 4 bytes. + // offset = 0, 4, 8, etc + + for (i = 0; i < 4; i++) { + if (plane_select[i]) { + for (j = 0; j < 4; j++) { + // Get byte to write. + uint8_t b = (val >> (j * 8)); + + // Calculate offset. + int fb_offs = i + (offset + j) * 4; + + // Write pixel. + fb[fb_offs] = b; + } + } + } +} + +void vga_set_line_compare(int y) +{ + line_compare = y; +} + +void vga_set_palette_entry(int index, int r, int g, int b) +{ + index *= 3; + palette[index++] = r; + palette[index++] = g; + palette[index] = b; +} + +extern unsigned char *image; // The OpenGL background image texture + +void vga_show_framebuffer() +{ + int x, y; + + // Clear the screen. + memset(image, 0, FRAME_BUFFER_WIDTH * FRAME_BUFFER_HEIGHT * 3); + + copper1(); + copper2(); + + int nFirstLineIndex = (line_compare + 1); + + // Plot the palettised frame buffer. + uint8_t *ptr = fb; + + for (y = nFirstLineIndex; y < SCREEN_HEIGHT; y++) { + for (x = 0; x < SCREEN_WIDTH; x++) { + //ASSERT(x + hscroll_offset < FRAME_BUFFER_WIDTH); + uint8_t r, g, b; + int idx = ptr[x + hscroll_offset] * 3; + + r = palette[idx++]; + g = palette[idx++]; + b = palette[idx]; + + int ofs = (y * 320 + x) * 3; + image[ofs++] = r << 2; + image[ofs++] = g << 2; + image[ofs] = b << 2; + } + + ptr += FRAME_BUFFER_WIDTH; + } +} + +void vga_set_hscroll_offset(int offset) +{ + hscroll_offset = offset; +} + +void vga_upload_palette(uint8_t *pal) +{ + memcpy(palette, pal, 256 * 3); +} diff --git a/plzpart-gl/Makefile b/plzpart-gl/Makefile new file mode 100755 index 0000000..65bce9c --- /dev/null +++ b/plzpart-gl/Makefile @@ -0,0 +1,20 @@ + +PLZPART_OBJS = opengl.o main.o + +PLZPART_PATH = plzpart-gl + +PLZPART_PATH_OBJS = $(addprefix $(PLZPART_PATH)/,$(PLZPART_OBJS)) + +PLZPART_BIN = plzpart + +OBJS += $(PLZPART_PATH_OBJS) + +default-plzpart: + $(MAKE) -C .. plzpart-all + +plzpart-all: $(PLZPART_PATH)/$(PLZPART_BIN) + +$(PLZPART_PATH)/$(PLZPART_BIN): $(PLZPART_PATH_OBJS) + $(LD) -o $@ $(LDFLAGS) $(PLZPART_PATH_OBJS) $(LIBS) + +plz.c: tweak.h ptau.pre diff --git a/plzpart-gl/common.h b/plzpart-gl/common.h new file mode 100755 index 0000000..7603c7e --- /dev/null +++ b/plzpart-gl/common.h @@ -0,0 +1,25 @@ + +#include + + +uint16_t psini_read16(int); +uint8_t psini_read8(int); +void psini_write16(int, uint16_t); +void psini_write8(int, uint8_t); + +void vga_select_bitplanes_02(void); +void vga_select_bitplanes_13(void); +void vga_select_bitplanes_0123(void); +void vga_write32(int, int); +void vga_set_line_compare(int); +void vga_set_palette_entry(int, int, int, int); +void vga_show_framebuffer(void); +void vga_set_hscroll_offset(int); +void vga_upload_palette(uint8_t *); + +void initvect(void); + +int init_copper(void); +int close_copper(void); +void copper1(void); +void copper2(void); diff --git a/plzpart-gl/main.c b/plzpart-gl/main.c new file mode 100755 index 0000000..e754764 --- /dev/null +++ b/plzpart-gl/main.c @@ -0,0 +1,32 @@ +#include +#include "../dis/dis.h" +#include "graphics.h" +#include "opengl.h" +#include "common.h" + +extern void plz(); +extern void vect(); + +int main(int argc, char **argv) { + dis_partstart(); + float time = 0.0; + + if (init_graphics("Plzpart", argc, argv) < 0) { + fprintf(stderr, "Can't init graphics\n"); + return -1; + }; + + init_opengl(); + //init_copper(); + //initvect(); + + while(!dis_exit() && time < 32.32) { + draw_bg(time); + swap_buffers(); + time += (float)adjust_framerate() / 60; + } + + //vect(); + //close_copper(); + return 0; +} diff --git a/plzpart-gl/opengl.c b/plzpart-gl/opengl.c new file mode 100755 index 0000000..b9a9429 --- /dev/null +++ b/plzpart-gl/opengl.c @@ -0,0 +1,135 @@ +#include +#include +#include +#include +#include +#include "u2gl.h" +#include "opengl.h" + +static int view_width; +static int view_height; + +static struct u2gl_program bg_program; + +float obj[9]; + +float bg_obj[12] = { + 0.0f, 0.0f, 0.0f, + 320.0f, 0.0f, 0.0f, + 0.0f, 200.0f, 0.0f, + 320.0f, 200.0f, 0.0f +}; + +static const char vertex_shader_texture[] = +"uniform mat4 pMatrix;\n" +"uniform mat4 uMatrix;\n" +"attribute vec4 aPosition;\n" +"varying vec3 vPosition;\n" +"attribute vec2 aTexPosition;\n" +"varying vec2 vTexPosition;\n" +"\n" +"void main() {\n" +" mat4 Matrix = pMatrix * uMatrix;\n" +" vec4 position = Matrix * aPosition;\n" +" gl_Position = position;\n" +" vTexPosition = aTexPosition;\n" +" vPosition = vec3(position);\n" +"}\n"; + +static char fragment_shader_texture[20000]; + +int uRes_location; +int uTime_location; + +static float tex_coords[] = { + 0.0f, 1.0f, + 1.0f, 1.0f, + 0.0f, 0.0f, + 1.0f, 0.0f +}; + +void draw_bg(float t) +{ + glUniform1f(uTime_location, t); + + //glActiveTexture(GL_TEXTURE0); + //glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 320, 400, GL_RGB, + // GL_UNSIGNED_BYTE, image); + glUseProgram(bg_program.program); + u2gl_draw_textured_triangle_strip(&bg_program, bg_obj, 4); +} + +#if 0 +static void init_texture() +{ + GLuint tex[3]; + + u2gl_set_tex_coords(tex_coords); + + glGenTextures(1, tex); + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, tex[0]); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + + image = calloc(3, 320 * 400); + + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 320, 400, 0, GL_RGB, + GL_UNSIGNED_BYTE, image); + glGenerateMipmap(GL_TEXTURE_2D); + u2gl_check_error("init_texture 1"); +} +#endif + +extern int window_width; +extern int window_height; + +int init_opengl() +{ + GLuint v, f; + FILE *in; + + view_width = 320; + view_height = 200; + + in = fopen("plz.glsl", "r"); + if (in != NULL) { + fread(fragment_shader_texture, 20000, 1, in); + fclose(in); + } + + v = u2gl_compile_vertex_shader(vertex_shader_texture); + f = u2gl_compile_fragment_shader(fragment_shader_texture); + u2gl_create_program(&bg_program, f, v); + u2gl_check_error("create program bg"); + + uRes_location = glGetUniformLocation(bg_program.program, "iResolution"); + uTime_location = glGetUniformLocation(bg_program.program, "iGlobalTime"); + u2gl_check_error("get uniform locations"); + + glUniform3f(uRes_location, (float)window_width, (float)window_height, 0.0f); + u2gl_check_error("set resolution"); + + glDisable(GL_DEPTH_TEST); + glEnable(GL_BLEND); + + //glBlendFunc(GL_SRC_ALPHA, GL_ONE); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + glClearColor(.0, .0, .0, 0); + u2gl_check_error("init_opengl"); + + //init_texture(); + //u2gl_check_error("init_texture"); + + u2gl_projection(0, view_width, 0, view_height, &bg_program); + + return 0; +} + +void clear_screen() +{ + glClear(GL_COLOR_BUFFER_BIT); +} diff --git a/plzpart-gl/opengl.h b/plzpart-gl/opengl.h new file mode 100755 index 0000000..402ff9d --- /dev/null +++ b/plzpart-gl/opengl.h @@ -0,0 +1,4 @@ + +int init_opengl(void); +void clear_screen(void); +void draw_bg(float); diff --git a/plzpart-gl/plz.glsl b/plzpart-gl/plz.glsl new file mode 100755 index 0000000..773c02c --- /dev/null +++ b/plzpart-gl/plz.glsl @@ -0,0 +1,482 @@ +precision mediump float; + +uniform vec3 iResolution; // viewport resolution (in pixels) +uniform float iGlobalTime; // shader playback time (in seconds) + +#define PI 3.1415926535 +#define DPII (PI*2.0) + +int GetPerPlasmaTime(int t) +{ + // Get the time since this plasma started using the total time. + // Times for each plasma are (from the timetable array): 723, 1491, + // 1875, 2259, 2278. (64 is added to each time because it takes 64 + // frames to drop the current plasma offscreen before switching to + // the new one.) + + if (t < 723+64) { + + } else if (t < 1491+64) { + t -= 723+64; + } else if (t < 1875+64) { + t -= 1491+64; + } else if (t < 2259+64) { + t -= 1875+64; + } else if (t < 2278+64) { + t -= 2259+64; + } else { + t = 0; + } + + return t; +} + +int GetPlasmaIndex(int t) +{ + int nPlasmaIndex = 0; + + if (t < 723+64) { + nPlasmaIndex = 0; + } else if (t < 1491+64) { + nPlasmaIndex = 1; + } else if (t < 1875+64) { + nPlasmaIndex = 2; + } + + return nPlasmaIndex; +} + +int GetYOffset(int t) +{ + int nResult = 60; + bool bDrop = false; + + if ( (t >= 723) && (t < (723+64)) ) { + t -= 723; + bDrop = true; + } else if ( (t >= 1491) && (t < (1491+64)) ) { + t -= 1491; + bDrop = true; + } else if ( (t >= 1875) && (t < (1875+64)) ) { + t -= 1875; + bDrop = true; + } else if ( (t >= 2259) && (t < (2259+64)) ) { + t -= 2259; + bDrop = true; + } + + if (bDrop) { + nResult = t * t / 4 * 43 / 128 + 60; + } + + return nResult; +} + +float FadeColourComponent(float c, int t) +{ + float fResult = c; + float fProportion = 0.0; + + if ((t >= 0) && (t < 128)) { + // For plasma 1, fade from white to the palette. + fProportion = float(t) / 127.0; + fResult = (fProportion * c) + ((1.0 - fProportion) * 1.0); + } else if ( (t >= (723+64)) && (t < (723+64+32)) ) { + // For plasma 2, fade from black to the palette. + fProportion = float(t-723-64) / 31.0; + fResult = (fProportion * c) + ((1.0 - fProportion) * 0.0); + } else if ( (t >= (1491+64)) && (t < (1491+64+32)) ) { + // For plasma 3, fade from black to the palette. + fProportion = float(t-1491-64) / 31.0; + fResult = (fProportion * c) + ((1.0 - fProportion) * 0.0); + } + + return fResult; +} + +int GetInitialL1(int nPlasmaIndex) +{ + if (nPlasmaIndex == 0) { + return 1000; + } else if (nPlasmaIndex == 1) { + return 1000; + } else /* if (nPlasmaIndex == 2) */ { + return 3500; + } +} +int GetInitialL2(int nPlasmaIndex) +{ + if (nPlasmaIndex == 0) { + return 2000; + } else if (nPlasmaIndex == 1) { + return 2000; + } else /* if (nPlasmaIndex == 2) */ { + return 1000; + } +} + +int GetInitialL3(int nPlasmaIndex) +{ + if (nPlasmaIndex == 0) { + return 3000; + } else if (nPlasmaIndex == 1) { + return 4000; + } else /* if (nPlasmaIndex == 2) */ { + return 3000; + } +} + +int GetInitialL4(int nPlasmaIndex) +{ + if (nPlasmaIndex == 0) { + return 4000; + } else if (nPlasmaIndex == 1) { + return 4000; + } else /* if (nPlasmaIndex == 2) */ { + return 1000; + } +} + +int GetInitialK1(int nPlasmaIndex) +{ + if (nPlasmaIndex == 0) { + return 3500; + } else if (nPlasmaIndex == 1) { + return 1500; + } else /* if (nPlasmaIndex == 2) */ { + return 3500; + } +} + +int GetInitialK2(int nPlasmaIndex) +{ + if (nPlasmaIndex == 0) { + return 2300; + } else if (nPlasmaIndex == 1) { + return 2300; + } else /* if (nPlasmaIndex == 2) */ { + return 3300; + } +} + +int GetInitialK3(int nPlasmaIndex) +{ + if (nPlasmaIndex == 0) { + return 3900; + } else if (nPlasmaIndex == 1) { + return 3900; + } else /* if (nPlasmaIndex == 2) */ { + return 2900; + } +} + +int GetInitialK4(int nPlasmaIndex) +{ + if (nPlasmaIndex == 0) { + return 3670; + } else if (nPlasmaIndex == 1) { + return 1670; + } else /* if (nPlasmaIndex == 2) */ { + return 2670; + } +} + +int GetC1(int nXOffset0or1, int t) +{ + int nPlasmaIndex = GetPlasmaIndex(t); + t = GetPerPlasmaTime(t); + + int nResult = 0; + if (nXOffset0or1 == 0) { + nResult = GetInitialK1(nPlasmaIndex) + (-3 * t); + } else { + nResult = GetInitialL1(nPlasmaIndex) + (-1 * t); + } + + float fResult = float(nResult); + fResult = mod(fResult, 4096.0); + + if (fResult < 0.0) { + fResult += 4096.0; + } + + return int(fResult); +} + +int GetC2(int nXOffset0or1, int t) +{ + int nPlasmaIndex = GetPlasmaIndex(t); + t = GetPerPlasmaTime(t); + + int nResult = 0; + if (nXOffset0or1 == 0) { + nResult = GetInitialK2(nPlasmaIndex) + (-2 * t); + } else { + nResult = GetInitialL2(nPlasmaIndex) + (-2 * t); + } + + float fResult = float(nResult); + fResult = mod(fResult, 4096.0); + + if (fResult < 0.0) { + fResult += 4096.0; + } + + return int(fResult); +} + +int GetC3(int nXOffset0or1, int t) +{ + int nPlasmaIndex = GetPlasmaIndex(t); + t = GetPerPlasmaTime(t); + + int nResult = 0; + if (nXOffset0or1 == 0) { + nResult = GetInitialK3(nPlasmaIndex) + (1 * t); + } else { + nResult = GetInitialL3(nPlasmaIndex) + (2 * t); + } + + float fResult = float(nResult); + fResult = mod(fResult, 4096.0); + + if (fResult < 0.0) { + fResult += 4096.0; + } + + return int(fResult); +} + +int GetC4(int nXOffset0or1, int t) +{ + int nPlasmaIndex = GetPlasmaIndex(t); + t = GetPerPlasmaTime(t); + + int nResult = 0; + if (nXOffset0or1 == 0) { + nResult = GetInitialK4(nPlasmaIndex) + (2 * t); + } else { + nResult = GetInitialL4(nPlasmaIndex) + (3 * t); + } + + float fResult = float(nResult); + fResult = mod(fResult, 4096.0); + + if (fResult < 0.0) { + fResult += 4096.0; + } + + return int(fResult); +} + +float Palette0_GetRed(float nIndex) +{ + float a = 0.0; + + if ((nIndex >= 0.0) && (nIndex < 64.0)) { + a = nIndex; + } else if ((nIndex >= 64.0) && (nIndex < 128.0)) { + a = 63.0 - (nIndex - 64.0); + } else if ((nIndex >= 128.0) && (nIndex < 192.0)) { + a = 0.0; + } else { + a = nIndex - 192.0; + } + + return (cos(a*DPII/128.0+PI)*31.0+32.0) / 63.0; +} + +float Palette0_GetGreen(float nIndex) +{ + return 0.0; +} + +float Palette0_GetBlue(float nIndex) +{ + float a = 0.0; + + if ((nIndex >= 0.0) && (nIndex < 128.0)) { + a = 0.0; + } else if ((nIndex >= 128.0) && (nIndex < 192.0)) { + a = nIndex - 128.0; + } else { + a = 63.0 - (nIndex - 192.0); + } + + return (cos(a*DPII/128.0+PI)*31.0+32.0) / 63.0; +} + +float Palette1_GetGreen(float nIndex) +{ + float a = 0.0; + + if ((nIndex >= 0.0) && (nIndex < 128.0)) { + a = 0.0; + } else if ((nIndex >= 128.0) && (nIndex < 192.0)) { + a = nIndex - 128.0; + } else { + a = 63.0; + } + + return (cos(a*DPII/128.0+PI)*31.0+32.0) / 63.0; +} + +float Palette1_GetBlue(float nIndex) +{ + float a = 0.0; + + if ((nIndex >= 0.0) && (nIndex < 64.0)) { + a = 0.0; + } else if ((nIndex >= 64.0) && (nIndex < 128.0)) { + a = nIndex - 64.0; + } else if ((nIndex >= 128.0) && (nIndex < 192.0)) { + a = 63.0 - (nIndex - 128.0); + } else { + a = nIndex - 192.0; + } + + return (cos(a*DPII/128.0+PI)*31.0+32.0) / 63.0; +} + +float Palette2_GetRed(float nIndex) +{ + float a = 0.0; + + if ((nIndex >= 0.0) && (nIndex < 64.0)) { + a = 0.0; + } else if ((nIndex >= 64.0) && (nIndex < 128.0)) { + a = nIndex - 64.0; + } else if ((nIndex >= 128.0) && (nIndex < 192.0)) { + a = 63.0 - (nIndex - 128.0); + } else { + a = 0.0; + } + + return (cos(a*DPII/128.0+PI)*31.0+32.0) / 63.0 / 2.0; +} + +float Palette_GetRed(float nIndex, int t) +{ + int nPlasmaIndex = GetPlasmaIndex(t); + t = GetPerPlasmaTime(t); + float fResult = 0.0; + + if (nPlasmaIndex == 0) { + fResult = Palette0_GetRed(nIndex); + } else if (nPlasmaIndex == 1) { + fResult = Palette0_GetRed(nIndex); + } else if (nPlasmaIndex == 2) { + fResult = Palette2_GetRed(nIndex); + } + + return fResult; +} + +float Palette_GetGreen(float nIndex, int t) +{ + int nPlasmaIndex = GetPlasmaIndex(t); + t = GetPerPlasmaTime(t); + float fResult = 0.0; + + if (nPlasmaIndex == 0) { + fResult = Palette0_GetGreen(nIndex); + } else if (nPlasmaIndex == 1) { + fResult = Palette1_GetGreen(nIndex); + } else if (nPlasmaIndex == 2) { + fResult = Palette2_GetRed(nIndex); + } + + return fResult; +} + +float Palette_GetBlue(float nIndex, int t) +{ + int nPlasmaIndex = GetPlasmaIndex(t); + t = GetPerPlasmaTime(t); + float fResult = 0.0; + + if (nPlasmaIndex == 0) { + fResult = Palette0_GetBlue(nIndex); + } else if (nPlasmaIndex == 1) { + fResult = Palette1_GetBlue(nIndex); + } else if (nPlasmaIndex == 2) { + fResult = Palette2_GetRed(nIndex); + } + + return fResult; +} + +void main(void) +{ + // t is an integer frame count. + int t = int(iGlobalTime * 60.0); + + // Wrap t when it exceeds 2323, so that the plasmas will repeat. + float fT = float(t); + t = int(mod(fT, 1939.0)); + + // fPlasmaX is a float from 0 to 319, + // fPlasmaY is a float from 0 to 399. + float fPlasmaX = (gl_FragCoord.x / iResolution.x) * 319.0; + float fPlasmaY = (gl_FragCoord.y / iResolution.y) * 399.0; + fPlasmaY = 399.0 - fPlasmaY; + + fPlasmaY -= float(GetYOffset(t)); + /* fPlasmaX += float(GetXOffset(t)); */ + + float fRed = 0.0; + float fGreen = 0.0; + float fBlue = 0.0; + + if ( (fPlasmaY >= 0.0) && (fPlasmaY < 280.0) ) { + float fScreenX = gl_FragCoord.x; + float fScreenY = gl_FragCoord.y; + float ah = 0.0; + float ccc = fPlasmaX / 4.0; + float fOffset = 0.0; + float bx = 0.0; + + int nXOffset0or1 = int(mod(fScreenX, 2.0)); + + // On every odd row, toggle the x offset. This causes different + // plasma constants to be read for these pixels, achieving a + // chequered overlay of two plasmas. + + int xor = int(mod(fScreenY, 2.0)); + if (xor == 1) { + if (nXOffset0or1 == 0) { + nXOffset0or1 = 1; + } else { + nXOffset0or1 = 0; + } + } + + float c1 = float(GetC1(nXOffset0or1, t)); + float c2 = float(GetC2(nXOffset0or1, t)); + float c3 = float(GetC3(nXOffset0or1, t)); + float c4 = float(GetC4(nXOffset0or1, t)); + + fOffset = ((fPlasmaY * 2.0) + (c2 * 2.0) - (ccc * 8.0) + (80.0 * 8.0)) / 2.0; + bx = ((sin(fOffset*DPII/4096.0)*55.0+sin(fOffset*DPII/4096.0*4.0)*5.0+sin(fOffset*DPII/4096.0*17.0)*3.0+64.0)*16.0); + + fOffset = bx + c1 + (ccc * 8.0); + ah = (sin(fOffset*DPII/4096.0)*55.0+sin(fOffset*DPII/4096.0*6.0)*5.0+sin(fOffset*DPII/4096.0*21.0)*4.0+64.0); + + fOffset = ((fPlasmaY * 2.0) + (c4 * 2.0) + (ccc * 32.0)) / 2.0; + bx = ((sin(fOffset*DPII/4096.0)*55.0+sin(fOffset*DPII/4096.0*5.0)*8.0+sin(fOffset*DPII/4096.0*15.0)*2.0+64.0)*8.0); + + fOffset = bx + (fPlasmaY * 2.0) + c3 - (ccc * 4.0) + (80.0 * 4.0); + ah += (sin(fOffset*DPII/4096.0)*55.0+sin(fOffset*DPII/4096.0*6.0)*5.0+sin(fOffset*DPII/4096.0*21.0)*4.0+64.0); + + fRed = Palette_GetRed(ah, t); + fGreen = Palette_GetGreen(ah, t); + fBlue = Palette_GetBlue(ah, t); + } + + fRed = FadeColourComponent(fRed, t); + fGreen = FadeColourComponent(fGreen, t); + fBlue = FadeColourComponent(fBlue, t); + + gl_FragColor = vec4(fRed, fGreen, fBlue, 1.0); +} + diff --git a/plzpart-gl/plzpart b/plzpart-gl/plzpart new file mode 100755 index 0000000000000000000000000000000000000000..285d8039440cbf9042bf6712e83d8eee1567fcd0 GIT binary patch literal 51868 zcmeFa3wTu3)jzz?nMraILNd9*k&BMXC8&f10t6LFNCt=rFeCv(s}8wLGQlJhCld&2 zD;BY0M8R6CEh>1c^@`P6so*RdYG~lHdfsP{&I1kd0Ee`-8SQf{%Q-$Ec^1`F&GVe*yaNG`o z(FP&)lCFd87VzH!8V?gfdC)HE;4u&QJm}_81)PUX^S={qEh`eD>>jtlBMM#~HhmH3 zVE@{W@}XW#>g;Hq)Y&?*v!lDOzo<7{G+C7;4PwOH1&i@l*~v0q9F(1pgKa~4N%7}x zhaWvB`+P0+m!&B$m#>{tvVpXDI9NZHyVQN0Cf=z!k$E*Z{5Vc`-#2Tv@6QJwe*3Bm z?y7lv`|=Badcn5!A7<@3w{g^rj|N7)|ECYK?!W1?T(BnnenG>mABm%Ako6qmK02jQaz;TvpbK=Kz1vhSlo_B9OBCmYz3!ScaD@^7_h z1f-V^lD~40{4)m8rw^iEKS=*$gY=CXL|;3o{N_RYzCrv~4C4R8Ap5HZ(N7&@?}|b4 ze>n(0ZV-R@AbRT{ebXGc7wO+PaJJ_k2HDRsYyU{s2g!eN5dP_)@>zq*PZ)%MFsS_Q zLFEI3>Nj-|e%T=Y>_PJO4$?PiQ2C1o@lP8h@7+Q8f5+rVpFW5l7-awN2I2b$m49;(ek1VWD-qxEqdl#tfB7>C z_Xtz01fDq}MbbUuDDeXL-M?@fY^EHMEvk{Y@fx@BD_MT1xD0UD6}G$~;+!OTM~N)p zRgkaBA0<*@?<2R{{8=K+;cP<@QzL!Ah8bazBSn;VQS?(S#{N4jdmEltsmaJS0zN5buqrmpJlws38@UF9hW z4nAMEG`GETc1L&X*Qiw;y(BxeS41LBt3;p;${|t}|2nh5MzzNw+ zEulDC83{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3@6agd&|0Cj??dgJExQHF*fq^ zT=&&&nekvgGon~AUY%qUw>6gEZ=_D60!Jq_BPgoF)}u;Lq0mfG2`4?wANSAJdE{G! zhqYOF^5he~EBDt=YGjJa>KT2sFqnAgRTb>*6|x1i7UP1#D5$3h&hq=ki} zV_GKf2G&g85JQ8`K)D$TjGIQ2PODVs!_c;oZoSZ6+IqjfCH*rY>+dyeK3mwmyYP0@fKvidJD{MBARViu?zf{!ydq|O0Us$~((^>vl ziK~)5pR$coMe1I<$Ug-<6*C{f&NVm^Ak0(;j{|=;>YEoaqe{@b|rYE#)Ws%31Wrxi)x0dh*(JD=UcfuA_Hd z<)Wm|crLw;tQtq~g2JS?`R+qIHc^PNB_yMToj1TYkcqF7M)S zBvazovi>CK>3+SPX*c-0-7G;Rh2t*bm7nxve;UBBvZ{dKEWdA&O;2{IOMAf2qWnzn zNAze4-^ap-&plVvNm-iSuUyOOrLiDf`TRC|*N9iS(i2|&={9&F20opdwD-kcZiC6im zpT7G`2f?qW5P~a(-~aek^4=gzkAJySoczQ5r(bg$C|xmuUyFMz(L4A&^QBZMn% +#include +#include +#include +#include "tweak.h" + +//#define DO_TABLES +//#define DPII (3.1415926535*2.0) + +#define LINELEN 41 +#define MAXY 280 +#define YADD 0 +#define XADD 0 +#define SINMASK 4095 +#define PLZSINI(p1,p2,p3,p4) *ptr++ = (psini[x*32+lsini[y*2+p2]*16+p1] + psini[y*4+lsini[x*64+p4]*4+p3]) + (psini[x*32+16+lsini[y*2+p2]*16+p1] + psini[y*4+lsini[x*64+32+p4]*4+p3])*256; + +extern int init_copper(); +extern int close_copper(); +extern int far frame_count; +extern int far cop_drop; +extern int far cop_plz; +extern int far cop_start; +extern char far * far cop_fadepal; +extern char far fadepal[768]; +extern far char * far cop_pal; +extern far int do_pal; + +extern int plzline(int y, int vseg); +extern int setplzparas(int c1, int c2, int c3, int c4); +extern int set_plzstart(int y); +extern char far psini[16384]; +extern int far lsini4[8192]; +extern int far lsini16[8192]; + +//int (* vmem)[LINELEN]=MK_FP(0x0a000,0); +//char psini[16384]= +//#include "psini.pre" +//char lsini[16384]= +//#include "lsini.pre" + +char ptau[256]= +#include "ptau.pre" + +int pals[6][768]; +int curpal=0; +int timetable[10]={64*6*2-45,64*6*4-45,64*6*5-45,64*6*6-45,64*6*7+90,0}; +int ttptr=0; + +int l1=1000, l2=2000, l3=3000, l4=4000; +int k1=3500, k2=2300, k3=3900, k4=3670; + +int il1=1000, il2=2000, il3=3000, il4=4000; +int ik1=3500, ik2=2300, ik3=3900, ik4=3670; + +int inittable[10][8]={{1000,2000,3000,4000,3500,2300,3900,3670}, + {1000,2000,4000,4000,1500,2300,3900,1670}, + {3500,1000,3000,1000,3500,3300,2900,2670}, + {1000,2000,3000,4000,3500,2300,3900,3670}, + {1000,2000,3000,4000,3500,2300,3900,3670}, + {1000,2000,3000,4000,3500,2300,3900,3670}}; + +plz(){ + register int x,y; + int *ptr; + long tim=0,count=0; + int ch=0,sync=2; + + while(dis_musplus()<0 && !dis_exit()); + dis_setmframe(0); + + init_plz(); + cop_drop=128; + cop_fadepal=pals[curpal++]; + + frame_count=0; + while(!dis_exit()) + { + tim+=frame_count; frame_count=0; count++; + if(dis_getmframe()>timetable[ttptr]) + { + memset(fadepal,0,768); + cop_drop=1; + cop_fadepal=pals[curpal++]; + ttptr++; + il1=inittable[ttptr][0]; + il2=inittable[ttptr][1]; + il3=inittable[ttptr][2]; + il4=inittable[ttptr][3]; + ik1=inittable[ttptr][4]; + ik2=inittable[ttptr][5]; + ik3=inittable[ttptr][6]; + ik4=inittable[ttptr][7]; + } + if(curpal==5 && cop_drop>64) break; + + asm mov dx, 3c4h + asm mov ax, 0a02h + asm out dx, ax + + setplzparas(k1,k2,k3,k4); + for(y=0;y +#include +#include +#include +#include "tweak.h" + +extern far do_line(char far *to, int dx, int dy, int cnt, char far *from, long txx1, long txy1, long txx2, long txy2, int dseg); +extern far do_block(int ycnt); +extern far do_clear(char far *vmem, int far *otau, int far *ntau); + +extern int acstau[256]; +int sini[2000]; +char (* far vmem)[160]=MK_FP(0x0a000,0); +extern char far kuva1[128][256]; +extern char far kuva2[128][256]; +extern char far kuva3[128][256]; +extern char far dist1[128][256]; +char far buu[1000]; +char sinx[128], siny[128]; +char pal[768]; + +int clrtau[8][256][2]; +int clrptr=0; + +initvect() { + int a,b,x,y,s,d=0,p=0,ch; + + for(a=0;a<1524;a++) + { + sini[a]=s=sin(a/1024.0*M_PI*4)*127; + s-=sini[a]; + } + +/* for(a=0;a<65;a++) for(b=0;b<256;b++) // chessboard + { x=1; if((a>>4)&1) x^=3; if((b>>5)&1) x^=3; kuva[a][b]=x; } + + pal[0*192+3*1]=pal[0*192+3*1+1]=pal[0*192+3*1+2]=40; + pal[0*192+3*2]=pal[0*192+3*2+1]=pal[0*192+3*2+2]=60; +*/ + for(a=1;a<32;a++) // must-sini-valk + { pal[0*192+a*3]=0; pal[0*192+a*3+1]=0; pal[0*192+a*3+2]=a*2; } + for(a=0;a<32;a++) + { pal[0*192+a*3+32*3]=a*2; pal[0*192+a*3+1+32*3]=a*2; pal[0*192+a*3+2+32*3]=63; } + + for(a=0;a<32;a++) // must-pun-kelt + { pal[1*192+a*3]=a*2; pal[1*192+a*3+1]=0; pal[1*192+a*3+2]=0; } + for(a=0;a<32;a++) + { pal[1*192+a*3+32*3]=63; pal[1*192+a*3+1+32*3]=a*2; pal[1*192+a*3+2+32*3]=0; } + + + for(a=0;a<32;a++) // must-orans-viol + { pal[2*192+a*3]=a; pal[2*192+a*3+1]=0; pal[2*192+a*3+2]=a*2/3; } + for(a=0;a<32;a++) + { pal[2*192+a*3+32*3]=31-a; pal[2*192+a*3+1+32*3]=a*2; pal[2*192+a*3+2+32*3]=21; } + + + for(y=0;y<64;y++) for(x=0;x<256;x++) + { + kuva1[y][x]=sini[(y*4+sini[x*2])&511]/4+32; + kuva2[y][x]=sini[(y*4+sini[x*2])&511]/4+32+64; + kuva3[y][x]=sini[(y*4+sini[x*2])&511]/4+32+128; + } + + for(y=0;y<128;y++) for(x=0;x<256;x++) + dist1[y][x]=sini[y*8]/3; + + for(a=0;a<8*256;a++) { clrtau[0][a][0]=640; clrtau[0][a][1]=0; } + } + +extern far char * to; +extern far char * from; +extern far int * ctau; +extern far int dseg; +extern far int xx, yy; +extern far long ay1,ay2,ax1,ax2,xx1,yy1,xx2,yy2; +extern far long txx1,txy1,tay1,tax1; +extern far long txx2,txy2,tay2,tax2; + +int kuvataus[]={FP_SEG(kuva1),FP_SEG(kuva2),FP_SEG(kuva3),FP_SEG(kuva1)}; +int disttaus[]={FP_SEG(dist1),FP_SEG(dist1),FP_SEG(dist1),FP_SEG(dist1)}; + +do_poly(x1,y1,x2,y2,x3,y3,x4,y4,color, dd) +int x1,y1,x2,y2,x3,y3,x4,y4,color, dd; + { + int a,b,c,d,n=0,m,s1,s2,d1,d2,dx1,dy1,dx2,dy2; + + struct points { + int x,y; } pnts[4],txt[4]={{64,4},{190,4},{190,60},{64,60}}; +// int x,y; } pnts[4],txt[4]={{1,1},{63,1},{63,63},{1,63}}; + + dd=(dd+1)&63; + + pnts[0].x=x1; pnts[0].y=y1; + pnts[1].x=x2; pnts[1].y=y2; + pnts[2].x=x3; pnts[2].y=y3; + pnts[3].x=x4; pnts[3].y=y4; + + for(n=0,a=1;a<4;a++) if(pnts[a].y +#include +#include +#include +#include +#include +#include "tweak.h" + +#define SX sinit[kx] +#define SY sinit[ky] +#define SZ sinit[kz] +#define CX kosinit[kx] +#define CY kosinit[ky] +#define CZ kosinit[kz] + +extern far char (* far vmem)[160]; +extern char far pal[768]; + +extern clear(); +extern init(); +extern shadepal(char far *fpal, char far *ppal, int shade); +extern init_copper(); +extern close_copper(); +extern int far cop_rotatev; +extern far int frame_count; +extern far char * far cop_pal; +extern far int do_pal; +extern far int cop_start; +extern far int cop_scrl; + +extern int do_poly(); +extern int getspl(int where); +extern int far sinit[1024]; +extern int far kosinit[1024]; + +char far fpal[768]; + +struct object { + char name[100]; + + int pnts; + struct points_3d { + int x; + int y; + int z; + int xx; + int yy; + int zz; + int xxx; + int yyy; + } point[256]; + + int faces; + struct polygon { + int p1; + int p2; + int p3; + int p4; + int p5; + int p6; + int n; + int color; + } pg[256]; + + int lines; + struct lines { + int p1; + int p2; + int n; + int col; + } lin[256]; + } object={ + "Cube", + 8, // points + { + {125,125,125}, + {125,-125,125}, + {-125,-125,125}, + {-125,125,125}, + {125,125,-125}, + {125,-125,-125}, + {-125,-125,-125}, + {-125,125,-125}, + }, + 6, // faces + { + {1,2,3,0,0,0,0,0}, + {7,6,5,4,0,0,0,0}, + {0,4,5,1,0,0,0,1}, + {1,5,6,2,0,0,0,2}, + {2,6,7,3,0,0,0,1}, + {3,7,4,0,0,0,0,2}} + }; + +struct polygons_to_draw { + int p; + int dis; + } ptodraw[256]; +int polys=0; + +int light_src[6]={0}; +int lls[6]={0}; + +int cxx, cxy, cxz, cyx, cyy, cyz, czx, czy, czz; +int kx=0,ky=0,kz=0,dis=320,tx=0,ty=-50; +int ls_kx=0,ls_ky=0,ls_kz=0,ls_x=0,ls_y=0,ls_z=128; +int page=0; +int frames=0; + +vect() + { + int c=0,a; + + tw_opengraph(); + + while(dis_musplus()<13 && !dis_exit()); frame_count=0; + while(!dis_exit()) + { + a=dis_musplus(); + if(a>=-4 && a<0) break; + swappage(); + while(frame_count<1); frames+=frame_count; frame_count=0; + cop_pal=fpal; do_pal=1; + + calculate(1); + draw(15); + clear(); + } +// tw_closegraph(); + } + +calculate(int k) + { + int a; + static int px=0,py=256; + + getspl(4*256+frames*4); + kx=kx&1023; + ky=ky&1023; + kz=kz&1023; + ls_kx=ls_kx&1023; + ls_ky=ls_ky&1023; + + ls_y=kosinit[ls_kx]>>8; + ls_x=(sinit[ls_kx]>>8)*(sinit[ls_ky]>>8)>>7; + ls_z=(sinit[ls_kx]>>8)*(kosinit[ls_ky]>>8)>>7; + + count_const(); + rotate(); + sort_faces(); + } + +count_const() + { + //matrix equations: + //X Y Z -> nX + //X Y Z -> nY + //X Y Z -> nZ + // + // 0=Ycos*Zcos 2=Ycos*Zsin 4=-Ysin + // 6=Xsin*Zcos*Ysin 8=Xsin*Ysin*Zsin 10=Ycos*Xsin + // -Xcos*Zsin +Xcos*Zcos + //12=Xcos*Zcos*Ysin 14=Xcos*Ysin*Zsin 16=Ycos*Xcos + // +Xsin*Zsin -Xsin*Zcos + + cxx=(long)CY*(long)CZ>>15+7; + cxy=(long)CY*(long)SZ>>15+7; + cxz=-(long)SY>>7; + + cyx=((long)SX*(long)CZ+16384L>>15)*(long)SY - (long)CX*(long)SZ>>15+7; + cyy=((long)SX*(long)SY+16384L>>15)*(long)SZ + (long)CX*(long)CZ>>15+7; + cyz=(long)CY*(long)SX>>15+7; + + czx=((long)CX*(long)CZ+16384L>>15)*(long)SY + (long)SX*(long)SZ>>15+7; + czy=((long)CX*(long)SY+16384L>>15)*(long)SZ - (long)SX*(long)CZ>>15+7; + czz=(long)CY*(long)CX>>15+7; + + } + +rotate() + { + int a,b,x,y,z,xx,yy,zz; + + for(a=0;a>1) + (y*cxy>>1) + (z*cxz>>1)>>7)+tx; + object.point[a].yy=yy=((x*cyx>>1) + (y*cyy>>1) + (z*cyz>>1)>>7)+ty; + object.point[a].zz=zz=((x*czx>>1) + (y*czy>>1) + (z*czz>>1)>>7)+dis; + +/* + 1000,1000,1000 + + x*256, y*213, / ( +*/ + + object.point[a].xxx=(xx*256L)/zz+160+160; + object.point[a].yyy=(yy*142L)/zz+66; + } + } + +sort_faces() + { + int a=0,b,c,x,y,z,p=0; + long ax,ay,az,bx,by,bz,kx,ky,kz,nx,ny,nz,s,l; + + while(a0) { a++; continue; } + + s=(ls_x*nx+ls_y*ny+ls_z*nz)/250000+32; + light_src[p]=s; + c=object.pg[a].color; + if(lls[p]!=light_src[p]) + { + shadepal(&fpal[c*64*3],&pal[c*64*3], light_src[p]); + lls[p]=light_src[p]; + } + + ptodraw[p++].p=a++; + } + polys=p; + } + + +draw() + { + int a=0,b,c,f,x,y,z; + long ax,ay,az,bx,by,bz,kx,ky,kz,nx,ny,nz,s; + + for(a=0;a