Skip to content

Commit 26c3e6d

Browse files
committed
Forgotten commit?
1 parent 635954d commit 26c3e6d

File tree

4 files changed

+51
-9
lines changed

4 files changed

+51
-9
lines changed

CHANGES

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
1.03
2+
====
3+
4+
- a real networking support! (ported from TyrQuake project)
5+
6+
- used standard XBIOS call for both VGA and RGB resolution setting
7+
8+
- decreased memory usage to 32 MB (IMO, still much more than needed)
9+
10+
- preliminary SuperVidel support (screen buffers are placed into SV memory
11+
instead of the slow ST-RAM but the C2P process still takes a place)
12+
113
1.02
214
====
315

README

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ just a few notes...
1414
need a perl package from sparemint distribution to run it
1515

1616
- it's possible you'll get some compile errors -- i use some own <mint/*>
17-
includes (with constants from Atari Compendium) -- drop me a line if
18-
you're interested
17+
includes (with constants from Atari Compendium); newer mintlib versions
18+
already contain these changes
1919

2020
- asm68k directory contains original amiga sources. but beware! they had
2121
to be changed since not everything can be handled by perl script!

sys_atari.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,6 @@ static unsigned char shiftToAscii[128];
4545
static unsigned char capsToAscii[128];
4646
static qboolean isMintPresent = false;
4747

48-
typedef struct
49-
{
50-
long cookie;
51-
long value;
52-
} COOKIE;
53-
5448
/*
5549
* TODO:
5650
* =====
@@ -84,6 +78,11 @@ int findhandle (void)
8478

8579
long CheckMintPresence( void )
8680
{
81+
typedef struct
82+
{
83+
long cookie;
84+
long value;
85+
} COOKIE;
8786
COOKIE* pCookie;
8887

8988
pCookie = *( (COOKIE **)0x5A0L );
@@ -95,6 +94,7 @@ long CheckMintPresence( void )
9594
if( pCookie->cookie == C_MiNT )
9695
{
9796
isMintPresent = true;
97+
break;
9898
}
9999

100100
} while( (pCookie++)->cookie != 0L );

vid_atari.c

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ byte surfcache[4*1024*1024];
4545
char* screen1 = NULL; // physical screen
4646

4747
static qboolean isVideoInited = false;
48+
static qboolean isSvPresent = false;
4849

4950
static char* screen2 = NULL; // logical screen
5051
static char* screen3 = NULL; // temp screen
@@ -55,6 +56,33 @@ static qboolean vga;
5556
unsigned short d_8to16table[256];
5657
unsigned d_8to24table[256];
5758

59+
static long CheckSvPresence( void )
60+
{
61+
typedef struct
62+
{
63+
long cookie;
64+
long value;
65+
} COOKIE;
66+
COOKIE* pCookie;
67+
68+
pCookie = *( (COOKIE **)0x5A0L );
69+
70+
if( pCookie != NULL)
71+
{
72+
do
73+
{
74+
if( pCookie->cookie == 0x53757056 /*'SupV'*/ )
75+
{
76+
isSvPresent = true;
77+
break;
78+
}
79+
80+
} while( (pCookie++)->cookie != 0L );
81+
}
82+
83+
return 0;
84+
}
85+
5886
void VID_SetPalette (unsigned char *palette)
5987
{
6088
#ifndef NO_ATARI_VIDEO
@@ -70,6 +98,7 @@ void VID_ShiftPalette (unsigned char *palette)
7098
void VID_Init (unsigned char *palette)
7199
{
72100
vga = VgetMonitor() == MON_VGA;
101+
Supexec( CheckSvPresence );
73102

74103
vid.maxwarpwidth = vid.width = vid.conwidth = BASEWIDTH;
75104
vid.maxwarpheight = vid.height = vid.conheight = BASEHEIGHT;
@@ -129,7 +158,8 @@ void VID_Update (vrect_t *rects)
129158
char* temp;
130159

131160
#ifndef NO_ATARI_VIDEO
132-
video_atari_c2p( vid.buffer, screen + ( vga ? ( ( 240 - vid.height ) / 2 ) * vid.rowbytes : 0 ), vid.width * vid.height * sizeof( pixel_t ) );
161+
temp = screen + ( isSvPresent ? 0xA0000000 : 0x00000000 );
162+
video_atari_c2p( vid.buffer, temp + ( vga ? ( ( 240 - vid.height ) / 2 ) * vid.rowbytes : 0 ), vid.width * vid.height * sizeof( pixel_t ) );
133163

134164
// cycle 3 screens
135165
temp = screen1;

0 commit comments

Comments
 (0)