Skip to content

Commit

Permalink
Forgotten commit?
Browse files Browse the repository at this point in the history
  • Loading branch information
mikrosk committed Nov 1, 2017
1 parent 635954d commit 26c3e6d
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 9 deletions.
12 changes: 12 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
1.03
====

- a real networking support! (ported from TyrQuake project)

- used standard XBIOS call for both VGA and RGB resolution setting

- decreased memory usage to 32 MB (IMO, still much more than needed)

- preliminary SuperVidel support (screen buffers are placed into SV memory
instead of the slow ST-RAM but the C2P process still takes a place)

1.02
====

Expand Down
4 changes: 2 additions & 2 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ just a few notes...
need a perl package from sparemint distribution to run it

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

- asm68k directory contains original amiga sources. but beware! they had
to be changed since not everything can be handled by perl script!
Expand Down
12 changes: 6 additions & 6 deletions sys_atari.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ static unsigned char shiftToAscii[128];
static unsigned char capsToAscii[128];
static qboolean isMintPresent = false;

typedef struct
{
long cookie;
long value;
} COOKIE;

/*
* TODO:
* =====
Expand Down Expand Up @@ -84,6 +78,11 @@ int findhandle (void)

long CheckMintPresence( void )
{
typedef struct
{
long cookie;
long value;
} COOKIE;
COOKIE* pCookie;

pCookie = *( (COOKIE **)0x5A0L );
Expand All @@ -95,6 +94,7 @@ long CheckMintPresence( void )
if( pCookie->cookie == C_MiNT )
{
isMintPresent = true;
break;
}

} while( (pCookie++)->cookie != 0L );
Expand Down
32 changes: 31 additions & 1 deletion vid_atari.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ byte surfcache[4*1024*1024];
char* screen1 = NULL; // physical screen

static qboolean isVideoInited = false;
static qboolean isSvPresent = false;

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

static long CheckSvPresence( void )
{
typedef struct
{
long cookie;
long value;
} COOKIE;
COOKIE* pCookie;

pCookie = *( (COOKIE **)0x5A0L );

if( pCookie != NULL)
{
do
{
if( pCookie->cookie == 0x53757056 /*'SupV'*/ )
{
isSvPresent = true;
break;
}

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

return 0;
}

void VID_SetPalette (unsigned char *palette)
{
#ifndef NO_ATARI_VIDEO
Expand All @@ -70,6 +98,7 @@ void VID_ShiftPalette (unsigned char *palette)
void VID_Init (unsigned char *palette)
{
vga = VgetMonitor() == MON_VGA;
Supexec( CheckSvPresence );

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

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

// cycle 3 screens
temp = screen1;
Expand Down

0 comments on commit 26c3e6d

Please sign in to comment.