atsoft-commit Mailing List for Atani Software
Brought to you by:
atani
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
(21) |
Mar
|
Apr
(16) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Mike D. <at...@us...> - 2003-01-16 15:48:14
|
Update of /cvsroot/atsoft/lostlegends In directory sc8-pr-cvs1:/tmp/cvs-serv27829 Log Message: Initial Import. Status: Vendor Tag: atsoft Release Tags: start N lostlegends/GNUmakefile N lostlegends/lost N lostlegends/doc/INSTALL N lostlegends/doc/README N lostlegends/src/CHAIN.TXT N lostlegends/src/GNUmakefile N lostlegends/src/MAP.cpp N lostlegends/src/MAP.h N lostlegends/src/ini.h N lostlegends/src/main.cpp N lostlegends/src/player.cpp N lostlegends/src/player.h N lostlegends/maps/main.map N lostlegends/maps/main.def N lostlegends/gfx/map.ans N lostlegends/gfx/wand.ans N lostlegends/gfx/title.ans No conflicts created by this import ***** Bogus filespec: - Imported sources |
|
From: Mike D. <at...@us...> - 2003-01-16 15:39:10
|
Update of /cvsroot/atsoft/astelnet In directory sc8-pr-cvs1:/tmp/cvs-serv26724a Log Message: Initial Import Status: Vendor Tag: atsoft Release Tags: start N astelnet/README N astelnet/INSTALL N astelnet/GNUmakefile N astelnet/src/main.cpp N astelnet/src/Makefile N astelnet/src/astelnet.xml N astelnet/src/ansibox.cpp N astelnet/src/ansibox.h N astelnet/src/connections.cpp N astelnet/src/connections.h N astelnet/src/dosfont.h N astelnet/src/protocols/XProtocol.cpp N astelnet/src/protocols/XProtocol.h N astelnet/src/protocols/Makefile N astelnet/src/protocols/XProtocolCRC.cpp No conflicts created by this import ***** Bogus filespec: - Imported sources |
|
From: Mike D. <at...@us...> - 2002-04-10 04:55:34
|
Update of /cvsroot/atsoft/dcgen In directory usw-pr-cvs1:/tmp/cvs-serv25748 Added Files: readme.txt Log Message: This is the readme that documents the controls, etc. --- NEW FILE: readme.txt --- ------------------------------------------------------- DCGen 0.34 (c)2001-2002 Atani Software ------------------------------------------------------- DCGen is a port of Generator to the Sega DreamCast console. With this download you should have received a copy of the GNU Public License Version 2 as LICENSE. If you did not receive a copy and/or would like a copy of it you can write to: Free Software Foundation, Inc. 59 Temple Place Suite 330 Boston, MA 02111-1307, USA Contact: -------- Please use the website link below to follow the latest news about the DCGen software. Please use the bug tracking page on Sourceforge.net for reporting bugs. Website: http://www.atani-software.net/ SourceForge: http://sourceforge.net/projects/atsoft/ Known issues: ------------- 1) Some games still cause crashes 2) Sound is totally disabled 3) Video is still too slow 4) Slow/Complex (non-Simple) render mode has problems on some games. Ways to get high speed: ----------------------- Using the options screen enable the following options: 1) Simple Render 2) Auto-frameskip 3) Set auto-frameskip to a value from 2 to 4 (default is 4). Load any game and it should work better. Burning Information: -------------------- You should use a program like Self-Boot-Buddy or DCFactory if you want to burn the software and games onto the same CD. Game Selection Key mappings: ---------------------------- A Selects game B Backup/abort L Up 15 entries R Down 15 entries Y Rescan CD Options Screen Key Mappings: ---------------------------- A Enable/Disable Yes/No options A Increase auto Frameskip Count B Decrease auto Frameskip Count START Exit Options Screen Ingame Key mappings: -------------------- Unfortunately the key mappings are not possible to be changed once the source has been compiled. This is on the todo list for another time. DREAMCAST GENESIS ---------- -------- UP UP DOWN DOWN LEFT LEFT RIGHT RIGHT START START X A A B B C Special Keys: ------------- L MODE CHANGE R RESET L+R EXIT TO MENU |
|
From: Mike D. <at...@us...> - 2002-04-10 04:54:37
|
Update of /cvsroot/atsoft/dcgen
In directory usw-pr-cvs1:/tmp/cvs-serv25554
Modified Files:
ChangeLog
Log Message:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/atsoft/dcgen/ChangeLog,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** ChangeLog 8 Apr 2002 03:11:55 -0000 1.11
--- ChangeLog 10 Apr 2002 04:54:33 -0000 1.12
***************
*** 1,2 ****
--- 1,10 ----
+ [2002-04-09] -- Atani
+ -- New Feature!! Auto-frameskip
+ Enable this feature to gain even more speed in the games.
+ Runs best with the following:
+ 1) Z80 disabled.
+ 2) Simple Render
+ 3) FS count of around 4
+
[2002-04-07] -- Atani
-- General cleanup of source. Optimized a few areas to gain some
|
|
From: Mike D. <at...@us...> - 2002-04-10 04:53:13
|
Update of /cvsroot/atsoft/dcgen/ym2612
In directory usw-pr-cvs1:/tmp/cvs-serv25081/ym2612
Modified Files:
fm.c fm.h
Log Message:
Various speed hacks, fixes to the options screen and auto-frameskip code.
new feature: auto-frameskip.
Index: fm.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/ym2612/fm.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** fm.c 8 Apr 2002 01:15:33 -0000 1.2
--- fm.c 10 Apr 2002 04:53:08 -0000 1.3
***************
*** 1,16 ****
#include <kos.h>
- /*
- double pow(double x, double y) {
- double res = y;
- int pow_counter;
- for(pow_counter = 0;pow_counter<x;pow_counter++) res *= y;
- return res;
- }
-
- double log(double base)
- {
- return base;
- }
- */
#define YM2610B_WARNING
--- 1,3 ----
***************
*** 341,348 ****
int clock; /* master clock (Hz) */
int rate; /* sampling rate (Hz) */
! double freqbase; /* frequency base */
! double TimerBase; /* Timer base time */
#if FM_BUSY_FLAG_SUPPORT
! double BusyExpire; /* ExpireTime of Busy clear */
#endif
UINT8 address; /* address register */
--- 328,335 ----
int clock; /* master clock (Hz) */
int rate; /* sampling rate (Hz) */
! float freqbase; /* frequency base */
! float TimerBase; /* Timer base time */
#if FM_BUSY_FLAG_SUPPORT
! float BusyExpire; /* ExpireTime of Busy clear */
#endif
UINT8 address; /* address register */
***************
*** 954,958 ****
{
int i,d;
! double rate;
#if 0
--- 941,945 ----
{
int i,d;
! float rate;
#if 0
***************
*** 964,968 ****
for (d = 0;d <= 3;d++){
for (i = 0;i <= 31;i++){
! rate = ((double)DTTABLE[d*32 + i]) * SIN_LEN * ST->freqbase * (1<<FREQ_SH) / ((double)(1<<20));
ST->DT_TABLE[d][i] = (INT32) rate;
ST->DT_TABLE[d+4][i] = (INT32)-rate;
--- 951,955 ----
for (d = 0;d <= 3;d++){
for (i = 0;i <= 31;i++){
! rate = ((float)DTTABLE[d*32 + i]) * SIN_LEN * ST->freqbase * (1<<FREQ_SH) / ((float)(1<<20));
ST->DT_TABLE[d][i] = (INT32) rate;
ST->DT_TABLE[d+4][i] = (INT32)-rate;
***************
*** 983,992 ****
rate *= 1<< (i>>2); /* b2-5 : shift bit */
rate /= 12.0 * 1024.0;
! rate *= (double)(1<<ENV_SH);
ST->eg_tab[32+i] = rate;
#if 0
logerror("FM.C: Rate %2i %1i Decay [real %11.4f ms][emul %11.4f ms][d=%08x]\n",i>>2, i&3,
! ( ((double)(ENV_LEN<<ENV_SH)) / rate ) * (1000.0 / (double)ST->rate),
! ( ((double)(ENV_LEN<<ENV_SH)) / (double)ST->eg_tab[32+i] ) * (1000.0 / (double)ST->rate), ST->eg_tab[32+i] );
#endif
}
--- 970,979 ----
rate *= 1<< (i>>2); /* b2-5 : shift bit */
rate /= 12.0 * 1024.0;
! rate *= (float)(1<<ENV_SH);
ST->eg_tab[32+i] = rate;
#if 0
logerror("FM.C: Rate %2i %1i Decay [real %11.4f ms][emul %11.4f ms][d=%08x]\n",i>>2, i&3,
! ( ((float)(ENV_LEN<<ENV_SH)) / rate ) * (1000.0 / (float)ST->rate),
! ( ((float)(ENV_LEN<<ENV_SH)) / (float)ST->eg_tab[32+i] ) * (1000.0 / (float)ST->rate), ST->eg_tab[32+i] );
#endif
}
***************
*** 1028,1032 ****
signed int i,x;
signed int n;
! double o,m;
for (x=0; x<TL_RES_LEN; x++)
--- 1015,1019 ----
signed int i,x;
signed int n;
! float o,m;
for (x=0; x<TL_RES_LEN; x++)
***************
*** 1281,1292 ****
/* frequency base */
#if 1
! OPN->ST.freqbase = (OPN->ST.rate) ? ((double)OPN->ST.clock / OPN->ST.rate) / pres : 0;
#else
! OPN->ST.rate = (double)OPN->ST.clock / pres;
OPN->ST.freqbase = 1.0;
#endif
/* Timer base time */
! OPN->ST.TimerBase = 1.0/((double)OPN->ST.clock / (double)TimerPres);
/* SSG part prescaler set */
if( SSGpres ) SSGClk( OPN->ST.index, OPN->ST.clock * 2 / SSGpres );
--- 1268,1279 ----
/* frequency base */
#if 1
! OPN->ST.freqbase = (OPN->ST.rate) ? ((float)OPN->ST.clock / OPN->ST.rate) / pres : 0;
#else
! OPN->ST.rate = (float)OPN->ST.clock / pres;
OPN->ST.freqbase = 1.0;
#endif
/* Timer base time */
! OPN->ST.TimerBase = 1.0/((float)OPN->ST.clock / (float)TimerPres);
/* SSG part prescaler set */
if( SSGpres ) SSGClk( OPN->ST.index, OPN->ST.clock * 2 / SSGpres );
***************
*** 1298,1302 ****
/* freq table for octave 7 */
/* opn phase increment counter = 20bit */
! OPN->FN_TABLE[i] = (UINT32)( (double)i * 64 * OPN->ST.freqbase * (1<<(FREQ_SH-10)) ); /* -10 because chip works with 10.10 fixed point, while we use 16.16 */
#if 0
logerror("FM.C: FN_TABLE[%4i] = %08x (dec=%8i)\n",
--- 1285,1289 ----
/* freq table for octave 7 */
/* opn phase increment counter = 20bit */
! OPN->FN_TABLE[i] = (UINT32)( (float)i * 64 * OPN->ST.freqbase * (1<<(FREQ_SH-10)) ); /* -10 because chip works with 10.10 fixed point, while we use 16.16 */
#if 0
logerror("FM.C: FN_TABLE[%4i] = %08x (dec=%8i)\n",
***************
*** 1308,1313 ****
{
/* 3.98Hz,5.56Hz,6.02Hz,6.37Hz,6.88Hz,9.63Hz,48.1Hz,72.2Hz @ 8MHz */
! #define FM_LF(Hz) ((double)LFO_ENT*(1<<LFO_SH)*(Hz)/(8000000.0/144))
! static const double freq_table[8] = { FM_LF(3.98),FM_LF(5.56),FM_LF(6.02),FM_LF(6.37),FM_LF(6.88),FM_LF(9.63),FM_LF(48.1),FM_LF(72.2) };
#undef FM_LF
for(i=0;i<8;i++)
--- 1295,1300 ----
{
/* 3.98Hz,5.56Hz,6.02Hz,6.37Hz,6.88Hz,9.63Hz,48.1Hz,72.2Hz @ 8MHz */
! #define FM_LF(Hz) ((float)LFO_ENT*(1<<LFO_SH)*(Hz)/(8000000.0/144))
! static const float freq_table[8] = { FM_LF(3.98),FM_LF(5.56),FM_LF(6.02),FM_LF(6.37),FM_LF(6.88),FM_LF(9.63),FM_LF(48.1),FM_LF(72.2) };
#undef FM_LF
for(i=0;i<8;i++)
***************
*** 1457,1461 ****
/* b0-2 PMS */
/* 0,3.4,6.7,10,14,20,40,80(cent) */
! static const double pmd_table[8]={0,3.4,6.7,10,14,20,40,80};
/* b4-5 AMS */
--- 1444,1448 ----
/* b0-2 PMS */
/* 0,3.4,6.7,10,14,20,40,80(cent) */
! static const float pmd_table[8]={0,3.4,6.7,10,14,20,40,80};
/* b4-5 AMS */
***************
*** 3626,3634 ****
YM2151 *OPM = &(FMOPM[num]);
int i;
! double pom;
! double rate;
if (FMOPM[num].ST.rate)
! rate = (double)(1<<FREQ_BITS) / (3579545.0 / FMOPM[num].ST.clock * FMOPM[num].ST.rate);
else rate = 1;
--- 3613,3621 ----
YM2151 *OPM = &(FMOPM[num]);
int i;
! float pom;
! float rate;
if (FMOPM[num].ST.rate)
! rate = (float)(1<<FREQ_BITS) / (3579545.0 / FMOPM[num].ST.clock * FMOPM[num].ST.rate);
else rate = 1;
***************
*** 3710,3720 ****
/* f = fm * 2^(LFRQ/16) / (4295*10^6) */
{
! static double drate[16]={
1.0 ,1.044273782,1.090507733,1.138788635, /*0-3*/
1.189207115,1.241857812,1.296839555,1.354255547, /*4-7*/
1.414213562,1.476826146,1.542210825,1.610490332, /*8-11*/
1.681792831,1.75625216 ,1.834008086,1.915206561};
! double rate = pow(2.0,v/16)*drate[v&0x0f] / 4295000000.0;
! OPM->LFOIncr = (UINT32)((double)LFO_ENT*(1<<LFO_SH) * (OPM->ST.freqbase*64) * rate);
cur_chip = NULL;
}
--- 3697,3707 ----
/* f = fm * 2^(LFRQ/16) / (4295*10^6) */
{
! static float drate[16]={
1.0 ,1.044273782,1.090507733,1.138788635, /*0-3*/
1.189207115,1.241857812,1.296839555,1.354255547, /*4-7*/
1.414213562,1.476826146,1.542210825,1.610490332, /*8-11*/
1.681792831,1.75625216 ,1.834008086,1.915206561};
! float rate = pow(2.0,v/16)*drate[v&0x0f] / 4295000000.0;
! OPM->LFOIncr = (UINT32)((float)LFO_ENT*(1<<LFO_SH) * (OPM->ST.freqbase*64) * rate);
cur_chip = NULL;
}
***************
*** 3888,3893 ****
/* FMOPM[i].ST.status = 0; */
FMOPM[i].ST.timermodel = FM_TIMER_INTERVAL;
! FMOPM[i].ST.freqbase = rate ? ((double)clock / rate) / 64 : 0;
! FMOPM[i].ST.TimerBase = 1.0/((double)clock / 64.0);
/* Extend handler */
FMOPM[i].ST.Timer_Handler = TimerHandler;
--- 3875,3880 ----
/* FMOPM[i].ST.status = 0; */
FMOPM[i].ST.timermodel = FM_TIMER_INTERVAL;
! FMOPM[i].ST.freqbase = rate ? ((float)clock / rate) / 64 : 0;
! FMOPM[i].ST.TimerBase = 1.0/((float)clock / 64.0);
/* Extend handler */
FMOPM[i].ST.Timer_Handler = TimerHandler;
Index: fm.h
===================================================================
RCS file: /cvsroot/atsoft/dcgen/ym2612/fm.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** fm.h 18 Jan 2002 02:42:54 -0000 1.1.1.1
--- fm.h 10 Apr 2002 04:53:08 -0000 1.2
***************
*** 131,135 ****
#endif
! typedef void (*FM_TIMERHANDLER)(int n,int c,int cnt,double stepTime);
typedef void (*FM_IRQHANDLER)(int n,int irq);
/* FM_TIMERHANDLER : Stop or Start timer */
--- 131,135 ----
#endif
! typedef void (*FM_TIMERHANDLER)(int n,int c,int cnt,float stepTime);
typedef void (*FM_IRQHANDLER)(int n,int irq);
/* FM_TIMERHANDLER : Stop or Start timer */
|
|
From: Mike D. <at...@us...> - 2002-04-10 04:53:13
|
Update of /cvsroot/atsoft/dcgen/sn76496
In directory usw-pr-cvs1:/tmp/cvs-serv25081/sn76496
Modified Files:
sn76496.c
Log Message:
Various speed hacks, fixes to the options screen and auto-frameskip code.
new feature: auto-frameskip.
Index: sn76496.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/sn76496/sn76496.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** sn76496.c 18 Jan 2002 02:42:52 -0000 1.1.1.1
--- sn76496.c 10 Apr 2002 04:53:08 -0000 1.2
***************
*** 224,228 ****
/* STEP is a multiplier used to turn the fraction into a fixed point */
/* number. */
! R->UpdateStep = ((double)STEP * R->SampleRate * 16) / clock;
}
--- 224,228 ----
/* STEP is a multiplier used to turn the fraction into a fixed point */
/* number. */
! R->UpdateStep = (STEP * R->SampleRate * 16) / clock;
}
***************
*** 254,258 ****
int i;
struct SN76496 *R = &sn[chip];
- char name[40];
R->SampleRate = sample_rate;
--- 254,257 ----
|
|
From: Mike D. <at...@us...> - 2002-04-10 04:53:12
|
Update of /cvsroot/atsoft/dcgen In directory usw-pr-cvs1:/tmp/cvs-serv25081 Modified Files: Makefile.prefab Log Message: Various speed hacks, fixes to the options screen and auto-frameskip code. new feature: auto-frameskip. Index: Makefile.prefab =================================================================== RCS file: /cvsroot/atsoft/dcgen/Makefile.prefab,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Makefile.prefab 8 Apr 2002 01:15:32 -0000 1.5 --- Makefile.prefab 10 Apr 2002 04:53:08 -0000 1.6 *************** *** 32,36 **** KOS_LOCAL_CFLAGS = -I$(DCGEN_BASE)/hdr -I$(DCGEN_BASE)/mz80 -I$(DCGEN_BASE)/cpu68k -I$(DCGEN_BASE) -I$(DCGEN_BASE)/ym2612 -I$(DCGEN_BASE)/sn76496 -DDREAMCAST=1 ! ifdef RELEASE_BUILD KOS_LOCAL_CFLAGS += -DRELEASE_BUILD=1 -DNOLOGGING=1 -finline-functions endif --- 32,36 ---- KOS_LOCAL_CFLAGS = -I$(DCGEN_BASE)/hdr -I$(DCGEN_BASE)/mz80 -I$(DCGEN_BASE)/cpu68k -I$(DCGEN_BASE) -I$(DCGEN_BASE)/ym2612 -I$(DCGEN_BASE)/sn76496 -DDREAMCAST=1 ! ifneq (b$(RELEASE_BUILD),b) KOS_LOCAL_CFLAGS += -DRELEASE_BUILD=1 -DNOLOGGING=1 -finline-functions endif |
|
From: Mike D. <at...@us...> - 2002-04-10 04:53:12
|
Update of /cvsroot/atsoft/dcgen/gui
In directory usw-pr-cvs1:/tmp/cvs-serv25081/gui
Modified Files:
options.c
Log Message:
Various speed hacks, fixes to the options screen and auto-frameskip code.
new feature: auto-frameskip.
Index: options.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/gui/options.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** options.c 21 Feb 2002 06:44:36 -0000 1.3
--- options.c 10 Apr 2002 04:53:08 -0000 1.4
***************
*** 15,47 ****
char desc[80];
uint8 *variable;
! int boolean;
! int max_value;
! T_OPTION_STRING *opts;
} T_OPTIONS;
! T_OPTION_STRING render_opts[2] =
! {
! {"Complex", 0},
! {"Simple (cell)", 1},
! };
T_OPTIONS options[] =
{
// SOUND OPTIONS
! {"sound enabled", &sound_on, 1},
// VIDEO OPTIONS
! {"Rendering System", &ui_vdpsimple, 0, 2, (T_OPTION_STRING *)&render_opts},
! {"VDP LayerB Enable", &vdp_layerB, 1},
! {"VDP LayerB Priority Enable", &vdp_layerBp, 1},
! {"VDP LayerA Enable", &vdp_layerA, 1},
! {"VDP LayerA Priority Enable", &vdp_layerAp, 1},
! {"VDP LayerW Enable", &vdp_layerW, 1},
! {"VDP LayerW Priority Enable", &vdp_layerWp, 1},
! {"VDP LayerS Enable", &vdp_layerS, 1},
! {"VDP LayerS Priority Enable", &vdp_layerSp, 1},
// NULL OPTION TO SIGNAL END OF LIST
! {"\0", NULL, 0, 0, NULL},
};
--- 15,42 ----
char desc[80];
uint8 *variable;
! uint8 current;
! uint8 max;
} T_OPTIONS;
! extern uint8 auto_frameskip;
! extern uint8 auto_frameskip_count;
! extern uint8 ui_vdpsimple;
! extern unsigned int cpuz80_on;
T_OPTIONS options[] =
{
// SOUND OPTIONS
! {"sound enabled", &sound_on, 0, 1},
// VIDEO OPTIONS
! {"Simple [cell]", &ui_vdpsimple, 1},
! {"Auto-Frameskip [experimental]", &auto_frameskip, 0, 1},
! {"Frameskip Count [experimental]", &auto_frameskip_count, 4, 10},
!
! // CPU OPTIONS
! {"Z80 Emulation", (uint8*)&cpuz80_on, 0, 1},
// NULL OPTION TO SIGNAL END OF LIST
! {"\0", NULL, 1, 1},
};
***************
*** 54,64 ****
while(options[counter].variable != NULL)
{
! if(options[counter].boolean)
{
! draw_poly_strf(32.0f, y, 616.0f, 1.0f, 1.0f, 1.0f, 1.0f, "%s: %s", options[counter].desc, (*(options[counter].variable)? "Yes": "No"));
}
else
{
! draw_poly_strf(32.0f, y, 616.0f, 1.0f, 1.0f, 1.0f, 1.0f, "%s: %s", options[counter].desc, options[counter].opts[(*(options[counter].variable))].string);
}
if(counter == selected)
--- 49,59 ----
while(options[counter].variable != NULL)
{
! if(options[counter].max > 1)
{
! draw_poly_strf(32.0f, y, 616.0f, 1.0f, 1.0f, 1.0f, 1.0f, "%s: %u", options[counter].desc, options[counter].current);
}
else
{
! draw_poly_strf(32.0f, y, 616.0f, 1.0f, 1.0f, 1.0f, 1.0f, "%s: %s", options[counter].desc, (options[counter].current ? "Yes": "No"));
}
if(counter == selected)
***************
*** 79,84 ****
{
cont_cond_t cond, oldcond;
! unsigned char times = 0;
! unsigned char exit = 0;
int current = 0;
--- 74,79 ----
{
cont_cond_t cond, oldcond;
! uint8 times = 0;
! uint8 exit = 0;
int current = 0;
***************
*** 99,106 ****
exit = 1;
}
- else if(!(cond.buttons & CONT_START))
- {
- exit = 1;
- }
else if(!(cond.buttons & CONT_DPAD_UP))
{
--- 94,97 ----
***************
*** 126,136 ****
if(oldcond.buttons & CONT_A)
{
! if(options[current].boolean)
{
! *(options[current].variable) = !*(options[current].variable);
}
else
{
! *(options[current].variable) = options[current].opts[*(options[current].variable)++].value;
}
}
--- 117,143 ----
if(oldcond.buttons & CONT_A)
{
! if(options[current].max > 1)
{
! if(options[current].current < options[current].max)
! {
! options[current].current++;
! }
}
else
{
! options[current].current = !options[current].current;
! }
! }
! }
! else if(!(cond.buttons & CONT_B))
! {
! if(oldcond.buttons & CONT_B)
! {
! if(options[current].max > 1)
! {
! if(options[current].current)
! {
! options[current].current--;
! }
}
}
***************
*** 143,151 ****
}
}
-
-
times++;
times %= 12;
oldcond = cond;
}
}
--- 150,163 ----
}
}
times++;
times %= 12;
oldcond = cond;
+ }
+
+ current = 0;
+ while(options[current].variable != NULL)
+ {
+ *(options[current].variable) = options[current].current;
+ current++;
}
}
|
|
From: Mike D. <at...@us...> - 2002-04-10 04:53:12
|
Update of /cvsroot/atsoft/dcgen/main
In directory usw-pr-cvs1:/tmp/cvs-serv25081/main
Modified Files:
event.c ui-kos.c
Log Message:
Various speed hacks, fixes to the options screen and auto-frameskip code.
new feature: auto-frameskip.
Index: event.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/event.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** event.c 24 Jan 2002 06:05:36 -0000 1.2
--- event.c 10 Apr 2002 04:53:08 -0000 1.3
***************
*** 226,230 ****
int wide = vdp_reg[12] & 1;
int clocks, possible;
! double percent_possible;
int togo = (int)bytes;
--- 226,230 ----
int wide = vdp_reg[12] & 1;
int clocks, possible;
! float percent_possible;
int togo = (int)bytes;
***************
*** 249,253 ****
togo -= possible;
} else {
! event_freeze_clocks(((double)togo / possible) * clocks);
togo = 0;
}
--- 249,253 ----
togo -= possible;
} else {
! event_freeze_clocks(((float)togo / possible) * clocks);
togo = 0;
}
Index: ui-kos.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/ui-kos.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** ui-kos.c 8 Apr 2002 01:15:33 -0000 1.12
--- ui-kos.c 10 Apr 2002 04:53:08 -0000 1.13
***************
*** 25,28 ****
--- 25,31 ----
char *ui_initload = NULL;
uint8 ui_vdpsimple = 0;
+ uint8 auto_frameskip = 0;
+ uint8 auto_frameskip_count = 4;
+ uint8 ui_no_plot = 0;
pvr_ptr_t txr_base;
pvr_ptr_t txr_base_ex;
***************
*** 161,170 ****
}
int ui_loop()
{
! while(!gen_quit)
{
! event_doframe();
! ui_updatepads();
}
gen_quit = 0;
--- 164,226 ----
}
+ #define USEC_FRAME_NTSC 16667
+ #define USEC_FRAME_PAL
+ #define USEC_FRAME (vdp_pal ? USEC_FRAME_PAL : USEC_FRAME_NTSC)
+
+ struct timeval
+ {
+ long tv_sec;
+ long tv_usec;
+ };
+
int ui_loop()
{
! struct timeval oldclk, newclk;
! uint8 frames_to_do;
! uint32 usec = 0;
!
! if(sound_on || !auto_frameskip)
{
! ui_no_plot = 0;
! // With sound enabled we do not need to worry about
! // frameskip as it is internally enabled by the frame
! // event runner.
! while(!gen_quit)
! {
! event_doframe();
! ui_updatepads();
! }
! }
! else
! {
! // Deal with auto-frameskip
! gettimeofday(&oldclk, NULL);
! while(!gen_quit)
! {
! //
! gettimeofday(&newclk, NULL);
! if(newclk.tv_usec < oldclk.tv_usec)
! {
! usec += 1000000 + newclk.tv_usec - oldclk.tv_usec;
! }
! else
! {
! usec += newclk.tv_usec - oldclk.tv_usec;
! }
! frames_to_do = usec / USEC_FRAME;
! usec %= USEC_FRAME;
! oldclk = newclk;
!
! frames_to_do %= auto_frameskip_count;
! for(; frames_to_do > 1; --frames_to_do)
! {
! ui_no_plot = 1;
! event_doframe();
! ui_updatepads();
! }
! ui_no_plot = 0;
! event_doframe();
! ui_updatepads();
! }
}
gen_quit = 0;
***************
*** 244,248 ****
uint8 *p;
! if(ui_vdpsimple)
{
return;
--- 300,304 ----
uint8 *p;
! if(ui_vdpsimple || ui_no_plot)
{
return;
***************
*** 261,265 ****
vdp_renderline(line, p, 0);
}
! //palette_update();
}
--- 317,321 ----
vdp_renderline(line, p, 0);
}
! palette_update();
}
***************
*** 273,276 ****
--- 329,336 ----
uint32 u_max = (vdp_reg[12] & 1) ? 320 : 256;
+ if(ui_no_plot)
+ {
+ return;
+ }
palette_update();
|
|
From: Mike D. <at...@us...> - 2002-04-08 16:44:13
|
Update of /cvsroot/atsoft/dcgen/main
In directory usw-pr-cvs1:/tmp/cvs-serv12097/main
Modified Files:
Makefile gensoundp-kos.c mem68k.c ui-kos.c uip-kos.c vdp.c
Log Message:
Makefile.prefab: moved "-finline-funcs" optimization flag to the default set of "RELEASE" flags.
vdp.c: cleaned up and sped up some sections of code.
mem68k.c: cleanedup and sped up memory reading.
ui-kos.c: general code cleanup, worked out the correct values for the palette code, colors are a bit dark but are correct.
uip-kos.c: made it so it could compile again.
fm.c: general warnings cleanup (removed logging calls).
gensoundp-kos.c: general warnings cleanup.
Index: Makefile
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/Makefile,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Makefile 13 Feb 2002 07:57:25 -0000 1.5
--- Makefile 8 Apr 2002 01:15:33 -0000 1.6
***************
*** 1,4 ****
! #OBJS = cpu68k.o cpuz80.o event.o font.o generator.o gensound.o initcart.o logo.o mem68k.o memz80.o reg68k.o snprintf.o state.o ui-console.o vdp.o gensoundp-kos.o uip-kos.o uiplot.o sndstream.o ta_text.o
OBJS = cpu68k.o cpuz80.o event.o font.o generator.o gensound.o initcart.o logo.o mem68k.o memz80.o reg68k.o snprintf.o state.o vdp.o gensoundp-kos.o ui-kos.o ta_text.o
SUBDIRS =
--- 1,4 ----
! #OBJS = cpu68k.o cpuz80.o event.o font.o generator.o gensound.o initcart.o logo.o mem68k.o memz80.o reg68k.o snprintf.o state.o ui-console.o vdp.o gensoundp-kos.o uip-kos.o uiplot.o ta_text.o
OBJS = cpu68k.o cpuz80.o event.o font.o generator.o gensound.o initcart.o logo.o mem68k.o memz80.o reg68k.o snprintf.o state.o vdp.o gensoundp-kos.o ui-kos.o ta_text.o
SUBDIRS =
Index: gensoundp-kos.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/gensoundp-kos.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** gensoundp-kos.c 12 Feb 2002 05:56:20 -0000 1.3
--- gensoundp-kos.c 8 Apr 2002 01:15:33 -0000 1.4
***************
*** 21,30 ****
/*** file scoped variables ***/
- static int soundp_dev = -1;
- static int soundp_format;
- static int soundp_stereo;
- static int soundp_frag;
static int buffered_samples = 0;
- static unsigned int soundp_speed;
unsigned char *audio_buffer = NULL;
unsigned char *audio_temp = NULL;
--- 21,25 ----
***************
*** 131,135 ****
// For right now the sound is entirely disabled.
// The sound is to be worked on again in the near future.
! return;
if(audio_buffer == NULL)
{
--- 126,130 ----
// For right now the sound is entirely disabled.
// The sound is to be worked on again in the near future.
! return 0;
if(audio_buffer == NULL)
{
Index: mem68k.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/mem68k.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** mem68k.c 18 Jan 2002 02:42:46 -0000 1.1.1.1
--- mem68k.c 8 Apr 2002 01:15:33 -0000 1.2
***************
*** 184,193 ****
uint8 *mem68k_memptr_rom(uint32 addr)
{
! if (addr < cpu68k_romlen) {
! return (cpu68k_rom + addr);
! }
! LOG_CRITICAL(("%08X [MEM] Invalid memory access to ROM 0x%X ROMSIZE: 0x%X", regs68k.pc,
! addr, cpu68k_romlen));
! return cpu68k_rom;
}
--- 184,188 ----
uint8 *mem68k_memptr_rom(uint32 addr)
{
! return (cpu68k_rom + addr);
}
***************
*** 204,209 ****
uint8 mem68k_fetch_bad_byte(uint32 addr)
{
- LOG_CRITICAL(("%08X [MEM] Invalid memory fetch (byte) 0x%X", regs68k.pc,
- addr));
return 0;
}
--- 199,202 ----
***************
*** 211,216 ****
uint16 mem68k_fetch_bad_word(uint32 addr)
{
- LOG_CRITICAL(("%08X [MEM] Invalid memory fetch (word) 0x%X", regs68k.pc,
- addr));
return 0;
}
--- 204,207 ----
***************
*** 218,223 ****
uint32 mem68k_fetch_bad_long(uint32 addr)
{
- LOG_CRITICAL(("%08X [MEM] Invalid memory fetch (long) 0x%X", regs68k.pc,
- addr));
return 0;
}
--- 209,212 ----
***************
*** 225,242 ****
void mem68k_store_bad_byte(uint32 addr, uint8 data)
{
- LOG_CRITICAL(("%08X [MEM] Invalid memory store (byte) 0x%X = %X", regs68k.pc,
- addr, data));
}
void mem68k_store_bad_word(uint32 addr, uint16 data)
{
- LOG_CRITICAL(("%08X [MEM] Invalid memory store (word) 0x%X = %X", regs68k.pc,
- addr, data));
}
void mem68k_store_bad_long(uint32 addr, uint32 data)
{
- LOG_CRITICAL(("%08X [MEM] Invalid memory store (long) 0x%X = %X", regs68k.pc,
- addr, data));
}
--- 214,225 ----
***************
*** 246,255 ****
uint8 mem68k_fetch_rom_byte(uint32 addr)
{
! if (addr < cpu68k_romlen) {
! return (*(uint8 *)(cpu68k_rom + addr));
! }
! LOG_CRITICAL(("%08X [ROM] Invalid memory fetch (byte) 0x%X ROMSIZE:0x%X", regs68k.pc,
! addr, cpu68k_romlen));
! return 0;
}
--- 229,233 ----
uint8 mem68k_fetch_rom_byte(uint32 addr)
{
! return (*(uint8 *)(cpu68k_rom + addr));
}
***************
*** 262,268 ****
}
#endif
! if (addr < cpu68k_romlen) {
! return LOCENDIAN16(*(uint16 *)(cpu68k_rom + addr));
! }
LOG_CRITICAL(("%08X [ROM] Invalid memory fetch (word) 0x%X 0x%X", regs68k.pc,
addr, cpu68k_romlen));
--- 240,244 ----
}
#endif
! return LOCENDIAN16(*(uint16 *)(cpu68k_rom + addr));
LOG_CRITICAL(("%08X [ROM] Invalid memory fetch (word) 0x%X 0x%X", regs68k.pc,
addr, cpu68k_romlen));
***************
*** 278,310 ****
}
#endif
- if (addr < cpu68k_romlen) {
#ifdef ALIGNLONGS
! return (LOCENDIAN16(*(uint16 *)(cpu68k_rom + addr)) << 16) |
! LOCENDIAN16(*(uint16 *)(cpu68k_rom + addr + 2));
#else
! return LOCENDIAN32(*(uint32 *)(cpu68k_rom + addr));
#endif
- }
- LOG_CRITICAL(("%08X [ROM] Invalid memory fetch (long) 0x%X 0x%X", regs68k.pc,
- addr, cpu68k_romlen));
- return 0;
}
void mem68k_store_rom_byte(uint32 addr, uint8 data)
{
- LOG_CRITICAL(("%08X [ROM] Invalid memory store (byte) 0x%X = %X", regs68k.pc,
- addr, data));
}
void mem68k_store_rom_word(uint32 addr, uint16 data)
{
- LOG_CRITICAL(("%08X [ROM] Invalid memory store (word) 0x%X = %X", regs68k.pc,
- addr, data));
}
void mem68k_store_rom_long(uint32 addr, uint32 data)
{
- LOG_CRITICAL(("%08X [ROM] Invalid memory store (long) 0x%X = %X", regs68k.pc,
- addr, data));
}
--- 254,275 ----
}
#endif
#ifdef ALIGNLONGS
! return (LOCENDIAN16(*(uint16 *)(cpu68k_rom + addr)) << 16) |
! LOCENDIAN16(*(uint16 *)(cpu68k_rom + addr + 2));
#else
! return LOCENDIAN32(*(uint32 *)(cpu68k_rom + addr));
#endif
}
void mem68k_store_rom_byte(uint32 addr, uint8 data)
{
}
void mem68k_store_rom_word(uint32 addr, uint16 data)
{
}
void mem68k_store_rom_long(uint32 addr, uint32 data)
{
}
Index: ui-kos.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/ui-kos.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** ui-kos.c 4 Apr 2002 03:26:15 -0000 1.11
--- ui-kos.c 8 Apr 2002 01:15:33 -0000 1.12
***************
*** 37,45 ****
unsigned short pals[256] = {0};
- enum
- {
- SCREEN_100, SCREEN_200
- } ui_screenmode = SCREEN_200;
-
enum
{
--- 37,40 ----
***************
*** 91,101 ****
txr_base_ex = (pvr_ptr_t)pvr_mem_malloc(512*512*2);
- //PVR_SET(PVR_TEXTURE_MODULO, 10);
-
pvr_poly_cxt_txr(&txr_pal_ctx, PVR_LIST_TR_POLY, PVR_TXRFMT_PAL8BPP|PVR_TXRFMT_TWIDDLED, 512, 512, txr_base, 0);
#ifdef USE_TWIDDLED_TXR
! pvr_poly_cxt_txr(&txr_ex_ctx, PVR_LIST_TR_POLY, PVR_TXRFMT_ARGB1555|PVR_TXRFMT_TWIDDLED, 512, 512, txr_base_ex, 0);
#else
! pvr_poly_cxt_txr(&txr_ex_ctx, PVR_LIST_TR_POLY, PVR_TXRFMT_ARGB1555|PVR_TXRFMT_NONTWIDDLED, 512, 512, txr_base_ex, 0);
#endif
ui_initjoysticks();
--- 86,94 ----
txr_base_ex = (pvr_ptr_t)pvr_mem_malloc(512*512*2);
pvr_poly_cxt_txr(&txr_pal_ctx, PVR_LIST_TR_POLY, PVR_TXRFMT_PAL8BPP|PVR_TXRFMT_TWIDDLED, 512, 512, txr_base, 0);
#ifdef USE_TWIDDLED_TXR
! pvr_poly_cxt_txr(&txr_ex_ctx, PVR_LIST_TR_POLY, PVR_TXRFMT_RGB565|PVR_TXRFMT_TWIDDLED, 512, 512, txr_base_ex, 0);
#else
! pvr_poly_cxt_txr(&txr_ex_ctx, PVR_LIST_TR_POLY, PVR_TXRFMT_RGB565|PVR_TXRFMT_NONTWIDDLED, 512, 512, txr_base_ex, 0);
#endif
ui_initjoysticks();
***************
*** 150,184 ****
mem68k_cont[pad].c = !(cond.buttons & CONT_B);
pad++;
- if(!gen_quit)
- {
- gen_quit = !(cond.buttons & CONT_Y);
- }
! if(!cond.ltrig && cond.rtrig)
{
ui_vdpsimple = !ui_vdpsimple;
- /*
- if(ui_rendermode == PALETTED_TXR)
- {
- ui_rendermode = EXPANDED_TXR;
- }
- else if(ui_rendermode == EXPANDED_TXR)
- {
- ui_rendermode = PALETTED_TXR;
- }
- */
- }
- else if(cond.ltrig && !cond.rtrig)
- {
- if(ui_screenmode == SCREEN_100)
- {
- ui_screenmode = SCREEN_200;
- }
- else if(ui_screenmode == SCREEN_200)
- {
- ui_screenmode = SCREEN_100;
- }
}
! else if(cond.rtrig && cond.ltrig)
{
sound_stop();
--- 143,152 ----
mem68k_cont[pad].c = !(cond.buttons & CONT_B);
pad++;
! if(cond.ltrig && !cond.rtrig)
{
ui_vdpsimple = !ui_vdpsimple;
}
! else if(!cond.ltrig && cond.rtrig)
{
sound_stop();
***************
*** 186,189 ****
--- 154,161 ----
sound_start();
}
+ else if(cond.rtrig && cond.ltrig && !gen_quit)
+ {
+ gen_quit = 1;
+ }
}
}
***************
*** 204,223 ****
int i;
uint8 *p = (uint8 *)vdp_cram;
- uint8 r, g, b;
for(i = 0; i < 64; i++)
{
! b = (*p++ & 0x0E);
! g = (*p & 0xE0);
! r = ((*p++ & 0x0E) >> 4);
! #if 0
! pals[i] = 0x8000 | (r << 11) | (g << 6) | (b);
! pals[i + 64] = 0x8000 | (r << 10) | (g << 5) | (b >> 1) | (16 << 10) | (16 << 6) | 16;
! pals[i + 128] = 0x8000 | (r << 10) | (g << 5) | (b >> 1);
! #else
! pals[i] = 0x8000 | (r << 11) | (g << 6) | (b << 1);
! pals[i + 64] = 0x8000 | (r << 10) | (g << 5) | (b) | (16 << 10) | (16 << 6) | 16;
! pals[i + 128] = 0x8000 | (r << 10) | (g << 5) | (b);
vdp_cramf[i] = 0;
- #endif
}
if(ui_rendermode != PALETTED_TXR) return;
--- 176,197 ----
int i;
uint8 *p = (uint8 *)vdp_cram;
for(i = 0; i < 64; i++)
{
! p = (uint8 *)(vdp_cram + (i << 1));
! pals[i] = /* normal */
! (p[0] & 0x0E) << 1 |
! (p[1] & 0x0E) << 12 |
! (p[1] & 0xE0) << 3;
! pals[i + 64] = /* hilight */
! (p[0] & 0x0E) |
! (p[1] & 0x0E) << 11|
! (p[1] & 0xE0) << 2|
! (16) | (16 << 11) |
! (16 << 6);
! pals[i + 128] = /* shadow */
! (p[0] & 0x0E) |
! (p[1] & 0x0E) << 11|
! (p[1] & 0xE0) << 2;
vdp_cramf[i] = 0;
}
if(ui_rendermode != PALETTED_TXR) return;
***************
*** 263,279 ****
asm("pref @%0" : : "r" (d));
d += 8;
- /*
- COPYPIXEL(0);
- COPYPIXEL(1);
- COPYPIXEL(2);
- COPYPIXEL(3);
- //asm("pref @%0" : : "r" (s+4*16));
- COPYPIXEL(4);
- COPYPIXEL(5);
- COPYPIXEL(6);
- COPYPIXEL(7);
- asm("pref @%0" : : "r" (d));
- d += 8;
- */
}
}
--- 237,240 ----
***************
*** 307,312 ****
pvr_vertex_t vert;
pvr_poly_hdr_t screen_poly;
! uint32 y_size = 240;
! uint32 x_size = 320;
uint32 x = 0, y = 0;
uint32 u_max = (vdp_reg[12] & 1) ? 320 : 256;
--- 268,273 ----
pvr_vertex_t vert;
pvr_poly_hdr_t screen_poly;
! uint32 y_size = 480;
! uint32 x_size = 640;
uint32 x = 0, y = 0;
uint32 u_max = (vdp_reg[12] & 1) ? 320 : 256;
***************
*** 317,330 ****
{
vdp_renderframe(&screen[0], 512);
- }
- if(ui_screenmode == SCREEN_100)
- {
- x = 160;
- y = 80;
- }
- else
- {
- y_size = 480;
- x_size = 640;
}
// on a VGA cable we need to offset by 40.
--- 278,281 ----
Index: uip-kos.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/uip-kos.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** uip-kos.c 23 Jan 2002 08:08:28 -0000 1.2
--- uip-kos.c 8 Apr 2002 01:15:33 -0000 1.3
***************
*** 93,102 ****
if(maple_device_func(idx, unit) & MAPLE_FUNC_CONTROLLER)
{
! controllers[idx].address = maple_create_addr(idx, unit);
controller_count++;
}
else if(maple_device_func(idx, unit) & MAPLE_FUNC_LCD)
{
! controllers[idx].vmus[controllers[idx].vmu_count++] = maple_create_addr(idx, unit);
}
}
--- 93,102 ----
if(maple_device_func(idx, unit) & MAPLE_FUNC_CONTROLLER)
{
! controllers[idx].address = maple_addr(idx, unit);
controller_count++;
}
else if(maple_device_func(idx, unit) & MAPLE_FUNC_LCD)
{
! controllers[idx].vmus[controllers[idx].vmu_count++] = maple_addr(idx, unit);
}
}
***************
*** 218,233 ****
}
! if(cond.rtrig && !cond.ltrig)
! {
! ui_info ^= 1;
! ui_clearnext = 2;
!
! }
! else if(cond.ltrig && !cond.rtrig)
{
ui_fullscreen ^= 1;
ui_clearnext = 2;
}
! else if(cond.rtrig && cond.ltrig)
{
sound_stop();
--- 218,227 ----
}
! if(cond.ltrig && !cond.rtrig)
{
ui_fullscreen ^= 1;
ui_clearnext = 2;
}
! else if(!cond.ltrig && cond.rtrig)
{
sound_stop();
***************
*** 236,239 ****
--- 230,237 ----
sound_start();
}
+ else if(cond.rtrig && cond.ltrig && !quit)
+ {
+ quit = 1;
+ }
}
***************
*** 257,259 ****
--- 255,276 ----
{
return 0;
+ }
+
+ int ui_check_cond(uint32 flags)
+ {
+ int i;
+ cont_cond_t cond;
+ for(i = 0; i < 4; i++)
+ {
+ if(controllers[i].address == 0)
+ {
+ continue;
+ }
+ cont_get_cond(controllers[i].address, &cond);
+ if(!(cond.buttons & flags))
+ {
+ return 1;
+ }
+ }
+ return 0;
}
Index: vdp.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/vdp.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** vdp.c 4 Apr 2002 03:26:15 -0000 1.5
--- vdp.c 8 Apr 2002 01:15:33 -0000 1.6
***************
*** 83,87 ****
/*** forward references ***/
- void vdp_ramcopy_vram(int type);
void vdp_dma_vramcopy(void);
void vdp_dma_fill(uint8 data);
--- 83,86 ----
***************
*** 213,304 ****
vdp_ctrlflag = 0; /* Charles MacDonald - so he claims ;) */
[...1176 lines suppressed...]
! }
! }
! else
! {
! if(cpu68k_clocks > vdp_event_end)
! {
! return 0x0;
! }
percent = ((float)(cpu68k_clocks - vdp_event_hint) /
(float)(vdp_event_end - vdp_event_hint));
if (vdp_reg[12] & 1)
! {
! return ((uint8)(0xE4 + percent * 28) & 0xff);
! }
else
! {
! return ((uint8)(0xE8 + percent * 24) & 0xff);
! }
}
}
|
|
From: Mike D. <at...@us...> - 2002-04-08 16:40:02
|
Update of /cvsroot/atsoft/dcgen
In directory usw-pr-cvs1:/tmp/cvs-serv2363
Modified Files:
ChangeLog
Log Message:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/atsoft/dcgen/ChangeLog,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** ChangeLog 4 Apr 2002 03:26:14 -0000 1.10
--- ChangeLog 8 Apr 2002 03:11:55 -0000 1.11
***************
*** 1,2 ****
--- 1,6 ----
+ [2002-04-07] -- Atani
+ -- General cleanup of source. Optimized a few areas to gain some
+ extra speed. More optimizations to be done still.
+
[2002-04-02] -- Atani
-- General cleanup of source elements.
|
|
From: Mike D. <at...@us...> - 2002-04-08 16:39:12
|
Update of /cvsroot/atsoft/dcgen/ym2612
In directory usw-pr-cvs1:/tmp/cvs-serv12097/ym2612
Modified Files:
fm.c
Log Message:
Makefile.prefab: moved "-finline-funcs" optimization flag to the default set of "RELEASE" flags.
vdp.c: cleaned up and sped up some sections of code.
mem68k.c: cleanedup and sped up memory reading.
ui-kos.c: general code cleanup, worked out the correct values for the palette code, colors are a bit dark but are correct.
uip-kos.c: made it so it could compile again.
fm.c: general warnings cleanup (removed logging calls).
gensoundp-kos.c: general warnings cleanup.
Index: fm.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/ym2612/fm.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** fm.c 18 Jan 2002 02:42:54 -0000 1.1.1.1
--- fm.c 8 Apr 2002 01:15:33 -0000 1.2
***************
*** 1219,1283 ****
}
- #ifdef _STATE_H
- #if 0
- static void FM_channel_postload(FM_CH *CH,int num_ch)
- {
- int slot , ch;
-
- for(ch=0;ch<num_ch;ch++,CH++)
- {
- /* slots */
- for(slot=0;slot<4;slot++)
- {
- }
- }
- }
- #endif
- /* FM channel save , internal state only */
- static void FMsave_state_channel(const char *name,int num,FM_CH *CH,int num_ch)
- {
- int slot , ch;
- char state_name[20];
- const char slot_array[4] = { 1 , 3 , 2 , 4 };
-
- for(ch=0;ch<num_ch;ch++,CH++)
- {
- /* channel */
- sprintf(state_name,"%s.CH%d",name,ch);
- state_save_register_INT32(state_name, num, "feedback" , CH->op1_out , 2);
- state_save_register_UINT32(state_name, num, "phasestep" , &CH->fc , 1);
- /* slots */
- for(slot=0;slot<4;slot++)
- {
- FM_SLOT *SLOT = &CH->SLOT[slot];
-
- sprintf(state_name,"%s.CH%d.SLOT%d",name,ch,slot_array[slot]);
- state_save_register_UINT32(state_name, num, "phasecount" , &SLOT->Cnt , 1);
- state_save_register_UINT8 (state_name, num, "state" , &SLOT->state , 1);
- state_save_register_INT32 (state_name, num, "volume" , &SLOT->volume , 1);
- state_save_register_UINT32(state_name, num, "totallevel" , &SLOT->TLL , 1);
- }
- }
- }
-
- static void FMsave_state_st(const char *state_name,int num,FM_ST *ST)
- {
- #if FM_BUSY_FLAG_SUPPORT
- state_save_register_double(state_name, num, "BusyExpire", &ST->BusyExpire , 1);
- #endif
- state_save_register_UINT8 (state_name, num, "address" , &ST->address , 1);
- state_save_register_UINT8 (state_name, num, "IRQ" , &ST->irq , 1);
- state_save_register_UINT8 (state_name, num, "IRQ MASK" , &ST->irqmask , 1);
- state_save_register_UINT8 (state_name, num, "status" , &ST->status , 1);
- state_save_register_UINT32(state_name, num, "mode" , &ST->mode , 1);
- state_save_register_UINT8 (state_name, num, "prescaler" , &ST->prescaler_sel , 1);
- state_save_register_UINT8 (state_name, num, "freq latch", &ST->fn_h , 1);
- state_save_register_int (state_name, num, "TIMER A" , &ST->TA );
- state_save_register_int (state_name, num, "TIMER Acnt", &ST->TAC );
- state_save_register_UINT8 (state_name, num, "TIMER B" , &ST->TB , 1);
- state_save_register_int (state_name, num, "TIMER Bcnt", &ST->TBC );
- }
- #endif /* _STATE_H */
-
#if BUILD_OPN
/***********************************************************/
--- 1219,1222 ----
***************
*** 1466,1472 ****
break;
case 0x90: /* SSG-EG */
- #if !FM_SEG_SUPPORT
- if(v&0x08) LOG(LOG_ERR,("OPN %d,%d,%d :SSG-TYPE envelope selected (not supported )\n",OPN->ST.index,c,OPN_SLOT(r)));
- #endif
SLOT->SEG = v&0x0f;
break;
--- 1405,1408 ----
***************
*** 1705,1760 ****
}
- #ifdef _STATE_H
- static void YM2203_postload(void)
- {
- int num , r;
-
- for(num=0;num<YM2203NumChips;num++)
- {
- /* prescaler */
- OPNPrescaler_w(&FM2203[num].OPN,1,1);
-
- /* SSG registers */
- for(r=0;r<16;r++)
- {
- SSGWrite(num,0,r);
- SSGWrite(num,1,FM2203[num].REGS[r]);
- }
-
- /* OPN registers */
- /* DT / MULTI , TL , KS / AR , AMON / DR , SR , SL / RR , SSG-EG */
- for(r=0x30;r<0x9e;r++)
- if((r&3) != 3)
- OPNWriteReg(&FM2203[num].OPN,r,FM2203[num].REGS[r]);
- /* FB / CONNECT , L / R / AMS / PMS */
- for(r=0xb0;r<0xb6;r++)
- if((r&3) != 3)
- OPNWriteReg(&FM2203[num].OPN,r,FM2203[num].REGS[r]);
-
- /* channels */
- /*FM_channel_postload(FM2203[num].CH,3);*/
- }
- cur_chip = NULL;
- }
-
- static void YM2203_save_state(void)
- {
- int num;
- const char statename[] = "YM2203";
-
- for(num=0;num<YM2203NumChips;num++)
- {
- state_save_register_UINT8 (statename, num, "regs" , FM2203[num].REGS , 256);
- FMsave_state_st(statename,num,&FM2203[num].OPN.ST);
- FMsave_state_channel(statename,num,FM2203[num].CH,3);
- /* 3slots */
- state_save_register_UINT32 (statename, num, "slot3fc" , FM2203[num].OPN.SL3.fc , 3);
- state_save_register_UINT8 (statename, num, "slot3fh" , &FM2203[num].OPN.SL3.fn_h , 1);
- state_save_register_UINT8 (statename, num, "slot3kc" , FM2203[num].OPN.SL3.kcode , 3);
- }
- state_save_register_func_postload(YM2203_postload);
- }
- #endif /* _STATE_H */
-
/* ---------- Initialize YM2203 emulator(s) ---------- */
/* 'num' is the number of virtual YM2203's to allocate */
--- 1641,1644 ----
***************
*** 2419,2495 ****
}
- #ifdef _STATE_H
- static void YM2608_postload(void)
- {
- int num , r;
-
- for(num=0;num<YM2608NumChips;num++)
- {
- YM2608 *F2608 = &(FM2608[num]);
- /* prescaler */
- OPNPrescaler_w(&F2608->OPN,1,2);
- F2608->deltaT.freqbase = F2608->OPN.ST.freqbase;
- /* IRQ mask / mode */
- YM2608IRQMaskWrite(&F2608->OPN,F2608->REGS[0x29]);
- /* SSG registers */
- for(r=0;r<16;r++)
- {
- SSGWrite(num,0,r);
- SSGWrite(num,1,F2608->REGS[r]);
- }
-
- /* OPN registers */
- /* DT / MULTI , TL , KS / AR , AMON / DR , SR , SL / RR , SSG-EG */
- for(r=0x30;r<0x9e;r++)
- if((r&3) != 3)
- {
- OPNWriteReg(&F2608->OPN,r,F2608->REGS[r]);
- OPNWriteReg(&F2608->OPN,r|0x100,F2608->REGS[r|0x100]);
- }
- /* FB / CONNECT , L / R / AMS / PMS */
- for(r=0xb0;r<0xb6;r++)
- if((r&3) != 3)
- {
- OPNWriteReg(&F2608->OPN,r,F2608->REGS[r]);
- OPNWriteReg(&F2608->OPN,r|0x100,F2608->REGS[r|0x100]);
- }
- /* FM channels */
- /*FM_channel_postload(F2608->CH,6);*/
- /* rhythm(ADPCMA) */
- FM_ADPCMAWrite(F2608,1,F2608->REGS[0x111]);
- for( r=0x08 ; r<0x0c ; r++)
- FM_ADPCMAWrite(F2608,r,F2608->REGS[r+0x110]);
- /* Delta-T ADPCM unit */
- YM_DELTAT_postload(&F2608->deltaT , &F2608->REGS[0x100] );
- }
- cur_chip = NULL;
- }
-
- static void YM2608_save_state(void)
- {
- int num;
- const char statename[] = "YM2608";
-
- for(num=0;num<YM2608NumChips;num++)
- {
- YM2608 *F2608 = &(FM2608[num]);
-
- state_save_register_UINT8 (statename, num, "regs" , F2608->REGS , 512);
- FMsave_state_st(statename,num,&FM2608[num].OPN.ST);
- FMsave_state_channel(statename,num,FM2608[num].CH,6);
- /* 3slots */
- state_save_register_UINT32(statename, num, "slot3fc" , F2608->OPN.SL3.fc , 3);
- state_save_register_UINT8 (statename, num, "slot3fh" , &F2608->OPN.SL3.fn_h , 1);
- state_save_register_UINT8 (statename, num, "slot3kc" , F2608->OPN.SL3.kcode , 3);
- /* address register1 */
- state_save_register_int (statename, num, "address1" , &F2608->address1);
- /* rythm(ADPCMA) */
- FMsave_state_adpcma(statename,num,F2608->adpcm);
- /* Delta-T ADPCM unit */
- YM_DELTAT_savestate(statename,num,&FM2608[num].deltaT);
- }
- state_save_register_func_postload(YM2608_postload);
- }
- #endif /* _STATE_H */
/* -------------------------- YM2608(OPNA) ---------------------------------- */
--- 2303,2306 ----
***************
*** 3058,3130 ****
#if BUILD_OPNB
- #ifdef _STATE_H
- static void YM2610_postload(void)
- {
- int num , r;
-
- for(num=0;num<YM2610NumChips;num++)
- {
- YM2610 *F2610 = &(FM2610[num]);
- /* SSG registers */
- for(r=0;r<16;r++)
- {
- SSGWrite(num,0,r);
- SSGWrite(num,1,F2610->REGS[r]);
- }
-
- /* OPN registers */
- /* DT / MULTI , TL , KS / AR , AMON / DR , SR , SL / RR , SSG-EG */
- for(r=0x30;r<0x9e;r++)
- if((r&3) != 3)
- {
- OPNWriteReg(&F2610->OPN,r,F2610->REGS[r]);
- OPNWriteReg(&F2610->OPN,r|0x100,F2610->REGS[r|0x100]);
- }
- /* FB / CONNECT , L / R / AMS / PMS */
- for(r=0xb0;r<0xb6;r++)
- if((r&3) != 3)
- {
- OPNWriteReg(&F2610->OPN,r,F2610->REGS[r]);
- OPNWriteReg(&F2610->OPN,r|0x100,F2610->REGS[r|0x100]);
- }
- /* FM channels */
- /*FM_channel_postload(F2610->CH,6);*/
- /* rhythm(ADPCMA) */
- FM_ADPCMAWrite(F2610,1,F2610->REGS[0x111]);
- for( r=0x08 ; r<0x0c ; r++)
- FM_ADPCMAWrite(F2610,r,F2610->REGS[r+0x110]);
- /* Delta-T ADPCM unit */
- YM_DELTAT_postload(&F2610->deltaT , &F2610->REGS[0x100] );
- }
- cur_chip = NULL;
- }
-
- static void YM2610_save_state(void)
- {
- int num;
- const char statename[] = "YM2610";
-
- for(num=0;num<YM2610NumChips;num++)
- {
- YM2610 *F2610 = &(FM2610[num]);
-
- state_save_register_UINT8 (statename, num, "regs" , F2610->REGS , 512);
- FMsave_state_st(statename,num,&FM2610[num].OPN.ST);
- FMsave_state_channel(statename,num,FM2610[num].CH,6);
- /* 3slots */
- state_save_register_UINT32(statename, num, "slot3fc" , F2610->OPN.SL3.fc , 3);
- state_save_register_UINT8 (statename, num, "slot3fh" , &F2610->OPN.SL3.fn_h , 1);
- state_save_register_UINT8 (statename, num, "slot3kc" , F2610->OPN.SL3.kcode , 3);
- /* address register1 */
- state_save_register_int (statename, num, "address1" , &F2610->address1);
- state_save_register_UINT8 (statename, num, "arrivedFlag", &F2610->adpcm_arrivedEndAddress , 1);
- /* rythm(ADPCMA) */
- FMsave_state_adpcma(statename,num,F2610->adpcm);
- /* Delta-T ADPCM unit */
- YM_DELTAT_savestate(statename,num,&FM2610[num].deltaT);
- }
- state_save_register_func_postload(YM2610_postload);
- }
- #endif /* _STATE_H */
int YM2610Init(int num, int clock, int rate,
--- 2869,2872 ----
***************
*** 3520,3578 ****
}
- #ifdef _STATE_H
- static void YM2612_postload(void)
- {
- int num , r;
-
- for(num=0;num<YM2612NumChips;num++)
- {
- /* DAC data & port */
- /* James Ponder 2001-09-30 level setting of 5 found suitable */
- FM2612[num].dacout = ((int)FM2612[num].REGS[0x2a] - 0x80) << 5; /* level unknown */
- /* James Ponder 2001-10-19 fix from 0x2d to 0x2b */
- FM2612[num].dacen = FM2612[num].REGS[0x2b] & 0x80;
- /* OPN registers */
- /* DT / MULTI , TL , KS / AR , AMON / DR , SR , SL / RR , SSG-EG */
- for(r=0x30;r<0x9e;r++)
- if((r&3) != 3)
- {
- OPNWriteReg(&FM2612[num].OPN,r,FM2612[num].REGS[r]);
- OPNWriteReg(&FM2612[num].OPN,r|0x100,FM2612[num].REGS[r|0x100]);
- }
- /* FB / CONNECT , L / R / AMS / PMS */
- for(r=0xb0;r<0xb6;r++)
- if((r&3) != 3)
- {
- OPNWriteReg(&FM2612[num].OPN,r,FM2612[num].REGS[r]);
- OPNWriteReg(&FM2612[num].OPN,r|0x100,FM2612[num].REGS[r|0x100]);
- }
- /* channels */
- /*FM_channel_postload(FM2612[num].CH,6);*/
- }
- cur_chip = NULL;
- }
-
- /* James Ponder: removed static */
- void YM2612_save_state(void)
- {
- int num;
- const char statename[] = "YM2612";
-
- for(num=0;num<YM2612NumChips;num++)
- {
- state_save_register_UINT8 (statename, num, "regs" , FM2612[num].REGS , 512);
- FMsave_state_st(statename,num,&FM2612[num].OPN.ST);
- FMsave_state_channel(statename,num,FM2612[num].CH,6);
- /* 3slots */
- state_save_register_UINT32 (statename, num, "slot3fc" , FM2612[num].OPN.SL3.fc , 3);
- state_save_register_UINT8 (statename, num, "slot3fh" , &FM2612[num].OPN.SL3.fn_h , 1);
- state_save_register_UINT8 (statename, num, "slot3kc" , FM2612[num].OPN.SL3.kcode , 3);
- /* address register1 */
- state_save_register_int (statename, num, "address1" , &FM2612[num].address1);
- }
- state_save_register_func_postload(YM2612_postload);
- }
- #endif /* _STATE_H */
-
/* -------------------------- YM2612 ---------------------------------- */
int YM2612Init(int num, int clock, int rate,
--- 3262,3265 ----
***************
*** 3728,3732 ****
case 2:
case 3:
- LOG(LOG_WAR,("YM2612 #%d:A=%d read unmapped area\n"));
return FM_STATUS_FLAG(&F2612->OPN.ST);
}
--- 3415,3418 ----
***************
*** 4167,4216 ****
for(i = 0xff ; i >= 0x20 ; i-- ) OPMWriteReg(num,i,0);
}
-
- #ifdef _STATE_H
- static void YM2151_postload(void)
- {
- int num , r;
-
- for(num=0;num<YM2151NumChips;num++)
- {
- YM2151 *F2151 = &(FMOPM[num]);
-
- OPMWriteReg(num,0x0f,F2151->REGS[0x0f]); /* noise sel */
- OPMWriteReg(num,0x18,F2151->REGS[0x18]); /* lfreq */
- OPMWriteReg(num,0x1b,F2151->REGS[0x1b]); /* CT , W */
-
- for(r=0xff;r>=0x20;r--)
- OPMWriteReg(num,r,F2151->REGS[r]);
- /* channels */
- /*FM_channel_postload(F2151->CH,8);*/
- }
- cur_chip = NULL;
- }
-
- static void YM2151_save_state(void)
- {
- int num;
- const char statename[] = "YM2151";
-
- for(num=0;num<YM2151NumChips;num++)
- {
- YM2151 *F2151 = &(FMOPM[num]);
-
- state_save_register_UINT8 (statename, num, "regs" , F2151->REGS , 256);
- FMsave_state_st(statename,num,&F2151->ST);
- FMsave_state_channel(statename,num,F2151->CH,8);
-
- state_save_register_UINT32 (statename, num, "NoiseCount" , &F2151->NoiseCnt , 1);
- state_save_register_UINT32 (statename, num, "NoiseStep" , &F2151->NoiseIncr , 1);
- state_save_register_UINT32 (statename, num, "LFOCount" , &F2151->LFOCnt , 1);
- state_save_register_UINT32 (statename, num, "LFOStep" , &F2151->LFOIncr , 1);
- state_save_register_UINT8 (statename, num, "LFOPMD" , &F2151->pmd , 1);
- state_save_register_UINT8 (statename, num, "LFOAMD" , &F2151->amd , 1);
- state_save_register_UINT8 (statename, num, "test" , &F2151->testreg , 1);
- }
- state_save_register_func_postload(YM2151_postload);
- }
- #endif /* _STATE_H */
/* ---------- Initialize YM2151 emulator(s) ---------- */
--- 3853,3856 ----
|
|
From: Mike D. <at...@us...> - 2002-04-08 16:39:11
|
Update of /cvsroot/atsoft/dcgen/hdr In directory usw-pr-cvs1:/tmp/cvs-serv12097/hdr Modified Files: generator.h Log Message: Makefile.prefab: moved "-finline-funcs" optimization flag to the default set of "RELEASE" flags. vdp.c: cleaned up and sped up some sections of code. mem68k.c: cleanedup and sped up memory reading. ui-kos.c: general code cleanup, worked out the correct values for the palette code, colors are a bit dark but are correct. uip-kos.c: made it so it could compile again. fm.c: general warnings cleanup (removed logging calls). gensoundp-kos.c: general warnings cleanup. Index: generator.h =================================================================== RCS file: /cvsroot/atsoft/dcgen/hdr/generator.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** generator.h 24 Jan 2002 01:28:33 -0000 1.2 --- generator.h 8 Apr 2002 01:15:32 -0000 1.3 *************** *** 178,193 **** #ifdef NOLOGGING ! # define LOG_DEBUG3(x) /* */ ! # define LOG_DEBUG2(x) /* */ ! # define LOG_DEBUG1(x) /* */ ! # define LOG_USER(x) /* */ ! # define LOG_VERBOSE(x) /* */ ! # define LOG_NORMAL(x) /* */ ! # define LOG_CRITICAL(x) /* */ ! # define LOG_REQUEST(x) /* */ #else ! # define LOG_DEBUG3(x) /* ui_log_debug3 ## x */ ! # define LOG_DEBUG2(x) /* ui_log_debug2 ## x */ ! # define LOG_DEBUG1(x) /* ui_log_debug1 ## x */ # define LOG_USER(x) ui_log_user ## x # define LOG_VERBOSE(x) ui_log_verbose ## x --- 178,193 ---- #ifdef NOLOGGING ! # define LOG_DEBUG3(x) /* x */ ! # define LOG_DEBUG2(x) /* x */ ! # define LOG_DEBUG1(x) /* x */ ! # define LOG_USER(x) /* x */ ! # define LOG_VERBOSE(x) /* x */ ! # define LOG_NORMAL(x) /* x */ ! # define LOG_CRITICAL(x) /* x */ ! # define LOG_REQUEST(x) /* x */ #else ! # define LOG_DEBUG3(x) ui_log_debug3 ## x ! # define LOG_DEBUG2(x) ui_log_debug2 ## x ! # define LOG_DEBUG1(x) ui_log_debug1 ## x # define LOG_USER(x) ui_log_user ## x # define LOG_VERBOSE(x) ui_log_verbose ## x |
|
From: Mike D. <at...@us...> - 2002-04-08 16:39:11
|
Update of /cvsroot/atsoft/dcgen In directory usw-pr-cvs1:/tmp/cvs-serv12097 Modified Files: Makefile.prefab Log Message: Makefile.prefab: moved "-finline-funcs" optimization flag to the default set of "RELEASE" flags. vdp.c: cleaned up and sped up some sections of code. mem68k.c: cleanedup and sped up memory reading. ui-kos.c: general code cleanup, worked out the correct values for the palette code, colors are a bit dark but are correct. uip-kos.c: made it so it could compile again. fm.c: general warnings cleanup (removed logging calls). gensoundp-kos.c: general warnings cleanup. Index: Makefile.prefab =================================================================== RCS file: /cvsroot/atsoft/dcgen/Makefile.prefab,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Makefile.prefab 14 Feb 2002 05:56:27 -0000 1.4 --- Makefile.prefab 8 Apr 2002 01:15:32 -0000 1.5 *************** *** 33,41 **** ifdef RELEASE_BUILD ! KOS_LOCAL_CFLAGS += -DRELEASE_BUILD=1 -DNOLOGGING=1 endif ifdef EXP_OPT ! KOS_LOCAL_CFLAGS += -falign-functions -falign-jumps -falign-loops -fdce -fssa -fregmove -ffast-math -frerun-loop-opt -frerun-cse-after-loop -fgcse -funroll-all-loops -fdelete-null-pointer-checks -finline-functions -fmove-all-movables -freduce-all-givs -fexpensive-optimizations -fno-rtti endif --- 33,41 ---- ifdef RELEASE_BUILD ! KOS_LOCAL_CFLAGS += -DRELEASE_BUILD=1 -DNOLOGGING=1 -finline-functions endif ifdef EXP_OPT ! KOS_LOCAL_CFLAGS += -falign-functions -falign-jumps -falign-loops -fdce -fssa -fregmove -ffast-math -frerun-loop-opt -frerun-cse-after-loop -fgcse -funroll-all-loops -fdelete-null-pointer-checks -fmove-all-movables -freduce-all-givs -fexpensive-optimizations -fno-rtti endif |
|
From: Mike D. <at...@us...> - 2002-04-04 15:34:46
|
Update of /cvsroot/atsoft/cr In directory usw-pr-cvs1:/tmp/cvs-serv16590 Log Message: Initial import Status: Vendor Tag: cr_main Release Tags: cr_0_0_0 N cr/Makefile N cr/main.c N cr/Makefile.prefab N cr/timer.c N cr/main_loop.c N cr/video.c N cr/globals.h N cr/romdisk_boot/splash.png No conflicts created by this import ***** Bogus filespec: - Imported sources |
|
From: Mike D. <at...@us...> - 2002-04-04 15:34:46
|
Update of /cvsroot/atsoft/dcvmu In directory usw-pr-cvs1:/tmp/cvs-serv18406 Log Message: Initial import Status: Vendor Tag: dcvmu_main Release Tags: dcvmu_0_0_0 N dcvmu/cpu.c N dcvmu/getopt.c N dcvmu/lcdimg.c N dcvmu/main.c N dcvmu/mainwin.c N dcvmu/Makefile N dcvmu/prototypes.h N dcvmu/start.vms N dcvmu/ta_text.c N dcvmu/ta_text.h N dcvmu/version.h N dcvmu/vmu.5.xpm N dcvmu/vmu.xpm N dcvmu/Makefile.prefab No conflicts created by this import ***** Bogus filespec: - Imported sources |
|
From: Mike D. <at...@us...> - 2002-04-04 03:26:18
|
Update of /cvsroot/atsoft/dcgen/main
In directory usw-pr-cvs1:/tmp/cvs-serv3007/main
Modified Files:
ui-kos.c vdp.c
Log Message:
General updates from long ago finally being commited
Index: ui-kos.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/ui-kos.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** ui-kos.c 21 Feb 2002 06:48:43 -0000 1.10
--- ui-kos.c 4 Apr 2002 03:26:15 -0000 1.11
***************
*** 75,84 ****
if(maple_device_func(idx, unit) & MAPLE_FUNC_CONTROLLER)
{
! controllers[idx].address = maple_create_addr(idx, unit);
controller_count++;
}
else if(maple_device_func(idx, unit) & MAPLE_FUNC_LCD)
{
! controllers[idx].vmus[controllers[idx].vmu_count++] = maple_create_addr(idx, unit);
}
}
--- 75,84 ----
if(maple_device_func(idx, unit) & MAPLE_FUNC_CONTROLLER)
{
! controllers[idx].address = maple_addr(idx, unit);
controller_count++;
}
else if(maple_device_func(idx, unit) & MAPLE_FUNC_LCD)
{
! controllers[idx].vmus[controllers[idx].vmu_count++] = maple_addr(idx, unit);
}
}
Index: vdp.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/vdp.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** vdp.c 14 Feb 2002 05:56:27 -0000 1.4
--- vdp.c 4 Apr 2002 03:26:15 -0000 1.5
***************
*** 1446,1450 ****
for (line = 0; line < vertcells * 8; line++) {
#ifdef DREAMCAST
! memset4(linedata, background, 320/4);
#else
for (i = 0; i < (320 / 4); i++) {
--- 1446,1450 ----
for (line = 0; line < vertcells * 8; line++) {
#ifdef DREAMCAST
! memset(linedata, background, 320);
#else
for (i = 0; i < (320 / 4); i++) {
|
|
From: Mike D. <at...@us...> - 2002-04-04 03:26:18
|
Update of /cvsroot/atsoft/dcgen
In directory usw-pr-cvs1:/tmp/cvs-serv3007
Modified Files:
ChangeLog
Log Message:
General updates from long ago finally being commited
Index: ChangeLog
===================================================================
RCS file: /cvsroot/atsoft/dcgen/ChangeLog,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** ChangeLog 21 Feb 2002 06:47:58 -0000 1.9
--- ChangeLog 4 Apr 2002 03:26:14 -0000 1.10
***************
*** 1,2 ****
--- 1,5 ----
+ [2002-04-02] -- Atani
+ -- General cleanup of source elements.
+
[2002-02-20] -- Atani
-- Changed ui_err from doing a printf to pushing the error info onto
|
|
From: Mike D. <at...@us...> - 2002-02-21 06:48:45
|
Update of /cvsroot/atsoft/dcgen/main In directory usw-pr-cvs1:/tmp/cvs-serv12494 Modified Files: ui-kos.c Log Message: Removed unused variable from last checkin. Index: ui-kos.c =================================================================== RCS file: /cvsroot/atsoft/dcgen/main/ui-kos.c,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ui-kos.c 21 Feb 2002 06:46:36 -0000 1.9 --- ui-kos.c 21 Feb 2002 06:48:43 -0000 1.10 *************** *** 25,29 **** char *ui_initload = NULL; uint8 ui_vdpsimple = 0; - uint8 ui_err_exit = 0; pvr_ptr_t txr_base; pvr_ptr_t txr_base_ex; --- 25,28 ---- |
|
From: Mike D. <at...@us...> - 2002-02-21 06:48:01
|
Update of /cvsroot/atsoft/dcgen
In directory usw-pr-cvs1:/tmp/cvs-serv12205
Modified Files:
ChangeLog
Log Message:
Index: ChangeLog
===================================================================
RCS file: /cvsroot/atsoft/dcgen/ChangeLog,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ChangeLog 14 Feb 2002 05:56:27 -0000 1.8
--- ChangeLog 21 Feb 2002 06:47:58 -0000 1.9
***************
*** 1,2 ****
--- 1,7 ----
+ [2002-02-20] -- Atani
+ -- Changed ui_err from doing a printf to pushing the error info onto
+ the screen so the user knows what happened without the DC resetting.
+ Also defaulted it to dump back to the menu.
+
[2002-02-13] -- Atani
-- Fixed a couple bugs with the new "smaller" 68000 core. For some
***************
*** 53,56 ****
--- 58,62 ----
-- Changed the "abort romload" button to "B" as it was getting
in my way for testing.
+
[2002-01-25] -- Atani
-- New features for the romload:
|
|
From: Mike D. <at...@us...> - 2002-02-21 06:46:40
|
Update of /cvsroot/atsoft/dcgen/main
In directory usw-pr-cvs1:/tmp/cvs-serv11545
Modified Files:
ui-kos.c
Log Message:
ui-kos.c: Added code to move ui_err from doing a printf to dump to screen
instead. could add the printf again later if needed/desired.
Index: ui-kos.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/ui-kos.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** ui-kos.c 18 Feb 2002 16:02:29 -0000 1.8
--- ui-kos.c 21 Feb 2002 06:46:36 -0000 1.9
***************
*** 18,22 ****
#define USE_64_BIT_TXR_XFER 1
//#undef USE_64_BIT_TXR_XFER
- // the USE_64_BIT_TXR_XFER is broken right now. Will be fixed shortly.
// Do not use a twiddled txr as it is really slow.
--- 18,21 ----
***************
*** 26,29 ****
--- 25,29 ----
char *ui_initload = NULL;
uint8 ui_vdpsimple = 0;
+ uint8 ui_err_exit = 0;
pvr_ptr_t txr_base;
pvr_ptr_t txr_base_ex;
***************
*** 217,225 ****
#else
pals[i] = 0x8000 | (r << 11) | (g << 6) | (b << 1);
! pals[i + 64] = 0x8000 | (r << 10) | (g << 5) | (b) | 0x510;
pals[i + 128] = 0x8000 | (r << 10) | (g << 5) | (b);
vdp_cramf[i] = 0;
#endif
-
}
if(ui_rendermode != PALETTED_TXR) return;
--- 217,224 ----
#else
pals[i] = 0x8000 | (r << 11) | (g << 6) | (b << 1);
! pals[i + 64] = 0x8000 | (r << 10) | (g << 5) | (b) | (16 << 10) | (16 << 6) | 16;
pals[i + 128] = 0x8000 | (r << 10) | (g << 5) | (b);
vdp_cramf[i] = 0;
#endif
}
if(ui_rendermode != PALETTED_TXR) return;
***************
*** 523,528 ****
vsprintf((char *)msg, text, ap);
va_end(ap);
! printf("ERROR: %s\n", msg);
! arch_exit(1);
}
--- 522,539 ----
vsprintf((char *)msg, text, ap);
va_end(ap);
! while(!ui_check_cond(CONT_B))
! {
! pvr_wait_ready();
! pvr_scene_begin();
! pvr_list_begin(PVR_LIST_OP_POLY);
! pvr_dummy_poly(PVR_LIST_OP_POLY);
! pvr_list_finish();
! pvr_list_begin(PVR_LIST_TR_POLY);
! draw_poly_strf(40.0f, 224.0f, 100.0f, 1.0f, 1.0f, 1.0f, 1.0f, "%s",msg);
! draw_poly_strf(40.0f, 400.0f, 100.0f, 1.0f, 1.0f, 1.0f, 1.0f, "PRESS B TO RETURN TO MENU.");
! pvr_list_finish();
! pvr_scene_finish();
! }
! gen_quit = 1;
}
|
|
From: Mike D. <at...@us...> - 2002-02-21 06:44:38
|
Update of /cvsroot/atsoft/dcgen/gui
In directory usw-pr-cvs1:/tmp/cvs-serv10819
Modified Files:
options.c romlist.c
Log Message:
options.c: first part of code cleanup for the new sound module.
romlist.c: added code to ensure that before calling ui_loop the gen_quit
variable has been reset to 0.
Index: options.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/gui/options.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** options.c 13 Feb 2002 07:57:25 -0000 1.2
--- options.c 21 Feb 2002 06:44:36 -0000 1.3
***************
*** 29,35 ****
{
// SOUND OPTIONS
! {"sound enabled (global)", &sound_on, 1},
! {"PSG sound enabled", &sound_psg, 1},
! {"FM sound enabled", &sound_fm, 1},
// VIDEO OPTIONS
--- 29,33 ----
{
// SOUND OPTIONS
! {"sound enabled", &sound_on, 1},
// VIDEO OPTIONS
Index: romlist.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/gui/romlist.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** romlist.c 13 Feb 2002 07:57:25 -0000 1.6
--- romlist.c 21 Feb 2002 06:44:36 -0000 1.7
***************
*** 187,190 ****
--- 187,191 ----
else
{
+ gen_quit = 0;
ui_loop();
prep_image("/rd/rommenu.jpg");
|
|
From: Mike D. <at...@us...> - 2002-02-18 16:08:07
|
Update of /cvsroot/atsoft/dcgen/main
In directory usw-pr-cvs1:/tmp/cvs-serv22402
Modified Files:
ui-kos.c
Log Message:
Cleanedup various problems with the palette (disabled new code for now, it has a bug in it still) and the faster palette based sq copy now works again, some reason with the latest KOS it doesnt like doing 32 pixel copies (expanded). The current code will render 16 pixels (expanded) in one shot.
Index: ui-kos.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/ui-kos.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ui-kos.c 14 Feb 2002 05:56:27 -0000 1.7
--- ui-kos.c 18 Feb 2002 16:02:29 -0000 1.8
***************
*** 16,21 ****
// This is used to enable the 64bit transfer of the txr
// to the TA from the internal array (palette expanded).
! //#define USE_64_BIT_TXR_XFER 1
! #undef USE_64_BIT_TXR_XFER
// the USE_64_BIT_TXR_XFER is broken right now. Will be fixed shortly.
--- 16,21 ----
// This is used to enable the 64bit transfer of the txr
// to the TA from the internal array (palette expanded).
! #define USE_64_BIT_TXR_XFER 1
! //#undef USE_64_BIT_TXR_XFER
// the USE_64_BIT_TXR_XFER is broken right now. Will be fixed shortly.
***************
*** 28,37 ****
pvr_ptr_t txr_base;
pvr_ptr_t txr_base_ex;
- uint32 old_pal_fmt;
uint8 screen[512*512];
uint16 screen_ex[512*512];
pvr_poly_cxt_t txr_ex_ctx;
pvr_poly_cxt_t txr_pal_ctx;
- #define PAL_FMT_RGB565 1
#define PAL_BANK_SHIFT (25)
#define PAL_BANK_MASK (3 << PAL_BANK_SHIFT)
--- 28,35 ----
***************
*** 94,107 ****
txr_base_ex = (pvr_ptr_t)pvr_mem_malloc(512*512*2);
- //old_pal_fmt = *(volatile uint32 *)0xa05f8108;
- //*(volatile uint32 *)0xa05f8108 = PAL_FMT_RGB565;
-
//PVR_SET(PVR_TEXTURE_MODULO, 10);
! pvr_poly_cxt_txr(&txr_pal_ctx, PVR_LIST_TR_POLY, PVR_TXRFMT_PAL8BPP, 512, 512, txr_base, 0);
#ifdef USE_TWIDDLED_TXR
! pvr_poly_cxt_txr(&txr_ex_ctx, PVR_LIST_TR_POLY, PVR_TXRFMT_RGB565, 512, 512, txr_base_ex, 0);
#else
! pvr_poly_cxt_txr(&txr_ex_ctx, PVR_LIST_TR_POLY, PVR_TXRFMT_RGB565|PVR_TXRFMT_NONTWIDDLED, 512, 512, txr_base_ex, 0);
#endif
ui_initjoysticks();
--- 92,102 ----
txr_base_ex = (pvr_ptr_t)pvr_mem_malloc(512*512*2);
//PVR_SET(PVR_TEXTURE_MODULO, 10);
! pvr_poly_cxt_txr(&txr_pal_ctx, PVR_LIST_TR_POLY, PVR_TXRFMT_PAL8BPP|PVR_TXRFMT_TWIDDLED, 512, 512, txr_base, 0);
#ifdef USE_TWIDDLED_TXR
! pvr_poly_cxt_txr(&txr_ex_ctx, PVR_LIST_TR_POLY, PVR_TXRFMT_ARGB1555|PVR_TXRFMT_TWIDDLED, 512, 512, txr_base_ex, 0);
#else
! pvr_poly_cxt_txr(&txr_ex_ctx, PVR_LIST_TR_POLY, PVR_TXRFMT_ARGB1555|PVR_TXRFMT_NONTWIDDLED, 512, 512, txr_base_ex, 0);
#endif
ui_initjoysticks();
***************
*** 113,117 ****
pvr_mem_free(txr_base);
pvr_mem_free(txr_base_ex);
- //*(volatile uint32 *)0xa05f8108 = old_pal_fmt;
}
--- 108,111 ----
***************
*** 215,231 ****
{
b = (*p++ & 0x0E);
! r = (*p & 0x0E);
! g = ((*p++ & 0xE0) >> 4);
! pals[i] = (r << 11) | (g << 6) | (b << 1);
! pals[i + 64] = (r << 10) | (g << 5) | (b) | 0x510;
! pals[i + 128] = (r << 10) | (g << 5) | (b);
vdp_cramf[i] = 0;
}
if(ui_rendermode != PALETTED_TXR) return;
for(i = 0; i < 64; i++)
{
! (*palette)[0][i ] = pals[i ];
! (*palette)[0][i + 64 ] = pals[i + 64 ];
! (*palette)[0][i + 128] = pals[i + 128];
}
}
--- 209,236 ----
{
b = (*p++ & 0x0E);
! g = (*p & 0xE0);
! r = ((*p++ & 0x0E) >> 4);
! #if 0
! pals[i] = 0x8000 | (r << 11) | (g << 6) | (b);
! pals[i + 64] = 0x8000 | (r << 10) | (g << 5) | (b >> 1) | (16 << 10) | (16 << 6) | 16;
! pals[i + 128] = 0x8000 | (r << 10) | (g << 5) | (b >> 1);
! #else
! pals[i] = 0x8000 | (r << 11) | (g << 6) | (b << 1);
! pals[i + 64] = 0x8000 | (r << 10) | (g << 5) | (b) | 0x510;
! pals[i + 128] = 0x8000 | (r << 10) | (g << 5) | (b);
vdp_cramf[i] = 0;
+ #endif
+
}
if(ui_rendermode != PALETTED_TXR) return;
for(i = 0; i < 64; i++)
{
! if(vdp_cramf[i])
! {
! vdp_cramf[i] = 0;
! (*palette)[0][i ] = (pals[i ] & 0x7FFF);
! (*palette)[0][i + 64 ] = (pals[i + 64 ] & 0x7FFF);
! (*palette)[0][i + 128] = (pals[i + 128] & 0x7FFF);
! }
}
}
***************
*** 242,246 ****
static void texture_memcpy64_pal(void *dest, void *src)
{
! int cnt = 32;
unsigned char *s = (unsigned char *)src;
unsigned int *d = (unsigned int *)(void *)
--- 247,251 ----
static void texture_memcpy64_pal(void *dest, void *src)
{
! int cnt = 64;
unsigned char *s = (unsigned char *)src;
unsigned int *d = (unsigned int *)(void *)
***************
*** 253,257 ****
COPYPIXEL(2);
COPYPIXEL(3);
! asm("pref @%0" : : "r" (s+4*16));
COPYPIXEL(4);
COPYPIXEL(5);
--- 258,262 ----
COPYPIXEL(2);
COPYPIXEL(3);
! //asm("pref @%0" : : "r" (s+4*16));
COPYPIXEL(4);
COPYPIXEL(5);
***************
*** 260,268 ****
asm("pref @%0" : : "r" (d));
d += 8;
COPYPIXEL(0);
COPYPIXEL(1);
COPYPIXEL(2);
COPYPIXEL(3);
! asm("pref @%0" : : "r" (s+4*16));
COPYPIXEL(4);
COPYPIXEL(5);
--- 265,274 ----
asm("pref @%0" : : "r" (d));
d += 8;
+ /*
COPYPIXEL(0);
COPYPIXEL(1);
COPYPIXEL(2);
COPYPIXEL(3);
! //asm("pref @%0" : : "r" (s+4*16));
COPYPIXEL(4);
COPYPIXEL(5);
***************
*** 271,274 ****
--- 277,281 ----
asm("pref @%0" : : "r" (d));
d += 8;
+ */
}
}
|
|
From: Mike D. <at...@us...> - 2002-02-18 15:52:26
|
Update of /cvsroot/atsoft/dcgen/main
In directory usw-pr-cvs1:/tmp/cvs-serv19167
Modified Files:
generator.c
Log Message:
Added PAL modes back into the init code for main().
Index: generator.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/main/generator.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** generator.c 14 Feb 2002 05:56:27 -0000 1.11
--- generator.c 18 Feb 2002 15:52:23 -0000 1.12
***************
*** 65,73 ****
}
kos_init_all(IRQ_ENABLE|THD_ENABLE, romdisk_boot);
pvr_init(¶ms);
- //#ifdef PAL_DREAMCAST
- // vid_init(DM_640x480_PAL_IL, PM_RGB565);
- // ta_init_defaults();
- //#endif
init_ta_text();
--- 65,74 ----
}
kos_init_all(IRQ_ENABLE|THD_ENABLE, romdisk_boot);
+ #ifdef PAL_DREAMCAST
+ vid_init(DM_640x480_PAL_IL, PM_RGB565);
+ #else
+ vid_init(DM_640x480_NTSC_IL, PM_RGB565);
+ #endif
pvr_init(¶ms);
init_ta_text();
|
|
From: Mike D. <at...@us...> - 2002-02-18 15:51:45
|
Update of /cvsroot/atsoft/dcgen/gui
In directory usw-pr-cvs1:/tmp/cvs-serv18947
Modified Files:
filelist.c
Log Message:
Removed the "./" entry as it is pretty pointless and without it it allows
one more rom to be displayed.
Index: filelist.c
===================================================================
RCS file: /cvsroot/atsoft/dcgen/gui/filelist.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** filelist.c 26 Jan 2002 03:51:44 -0000 1.2
--- filelist.c 18 Feb 2002 15:51:42 -0000 1.3
***************
*** 9,15 ****
void make_fake_entries()
{
! strcpy(file_entries[entry_count].realname, ".");
! strcpy(file_entries[entry_count].dispname, "./");
! file_entries[entry_count++].size = -1;
strcpy(file_entries[entry_count].realname, "..");
--- 9,15 ----
void make_fake_entries()
{
! // strcpy(file_entries[entry_count].realname, ".");
! // strcpy(file_entries[entry_count].dispname, "./");
! // file_entries[entry_count++].size = -1;
strcpy(file_entries[entry_count].realname, "..");
|