Merge remote-tracking branch 'upstream/master' into pcenginetarget

This commit is contained in:
mrdudz
2015-07-11 13:05:26 +02:00
112 changed files with 3314 additions and 940 deletions

View File

@@ -2,14 +2,14 @@
/* */
/* ace.h */
/* */
/* ACE system specific definitions */
/* ACE system-specific definitions */
/* */
/* */
/* */
/* (C) 1998-2001 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */
/* (C) 1998-2015, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
@@ -61,9 +61,9 @@ struct aceDirentBuf {
char ad_name [17]; /* Name itself, ASCIIZ */
};
int aceDirOpen (char* dir);
int aceDirClose (int handle);
int aceDirRead (int handle, struct aceDirentBuf* buf);
int __cdecl__ aceDirOpen (char* dir);
int __cdecl__ aceDirClose (int handle);
int __cdecl__ aceDirRead (int handle, struct aceDirentBuf* buf);
/* Type of an ACE key. Key in low byte, shift mask in high byte */
typedef unsigned int aceKey;
@@ -92,23 +92,23 @@ typedef unsigned int aceKey;
#define aceOP_RPTRATE 11 /* Key repeat rate */
/* Console functions */
void aceConWrite (char* buf, size_t count);
void aceConPutLit (int c);
void aceConPos (unsigned x, unsigned y);
void aceConGetPos (unsigned* x, unsigned* y);
void __cdecl__ aceConWrite (char* buf, size_t count);
void __cdecl__ aceConPutLit (int c);
void __cdecl__ aceConPos (unsigned x, unsigned y);
void __cdecl__ aceConGetPos (unsigned* x, unsigned* y);
unsigned aceConGetX (void);
unsigned aceConGetY (void);
char* aceConInput (char* buf, unsigned initial);
char __cdecl__* aceConInput (char* buf, unsigned initial);
int aceConStopKey (void);
aceKey aceConGetKey (void);
int aceConKeyAvail (aceKey* key);
void aceConKeyMat (char* matrix);
void aceConSetOpt (unsigned char opt, unsigned char val);
int aceConGetOpt (unsigned char opt);
int __cdecl__ aceConKeyAvail (aceKey* key);
void __cdecl__ aceConKeyMat (char* matrix);
void __cdecl__ aceConSetOpt (unsigned char opt, unsigned char val);
int __cdecl__ aceConGetOpt (unsigned char opt);
/* Misc stuff */
int aceMiscIoPeek (unsigned addr);
void aceMiscIoPoke (unsigned addr, unsigned char val);
int __cdecl__ aceMiscIoPeek (unsigned addr);
void __cdecl__ aceMiscIoPoke (unsigned addr, unsigned char val);

View File

@@ -6,10 +6,10 @@
/* */
/* */
/* */
/* (C) 1998-2000 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */
/* (C) 1998-2015, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
@@ -42,7 +42,7 @@
#ifdef NDEBUG
# define assert(expr)
#else
extern void _afailed (const char*, unsigned);
extern void __fastcall__ _afailed (const char*, unsigned);
# define assert(expr) ((expr)? (void)0 : _afailed(__FILE__, __LINE__))
#endif

View File

@@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 1998-2012, Ullrich von Bassewitz */
/* (C) 1998-2015, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@@ -222,7 +222,7 @@ void cbm_k_unlsn (void);
unsigned int cbm_load (const char* name, unsigned char device, void* data);
unsigned int __fastcall__ cbm_load (const char* name, unsigned char device, void* data);
/* Loads file "name", from given device, to given address -- or, to the load
** address of the file if "data" is the null pointer (like load"name",8,1
** in BASIC).

View File

@@ -77,6 +77,8 @@
# include <lynx.h>
#elif defined(__NES__)
# include <nes.h>
#elif defined(__OSIC1P__)
# include <osic1p.h>
#elif defined(__PCE__)
# include <pce.h>
#endif

View File

@@ -6,10 +6,10 @@
/* */
/* */
/* */
/* (C) 1998-2000 Ullrich von Bassewitz */
/* Wacholderweg 14 */
/* D-70597 Stuttgart */
/* EMail: uz@musoftware.de */
/* (C) 1998-2000, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
@@ -88,7 +88,7 @@ unsigned __fastcall__ DbgDisAsmLen (unsigned Addr);
int __fastcall__ DbgIsRAM (unsigned Addr);
/* Return true if we can read and write the given address */
char* DbgMemDump (unsigned Addr, char* Buf, unsigned char Len);
char* __cdecl__ DbgMemDump (unsigned Addr, char* Buf, unsigned char Len);
/* Create a line of a memory dump in the given buffer. The buffer contains
** the starting address (4 digits hex), then Len bytes in this format:
** "AAAA__XX_YY_ZZ_...". The passed char buffer must hold Len*3+5 bytes

View File

@@ -2,7 +2,7 @@
/* */
/* lynx.h */
/* */
/* Lynx system specific definitions */
/* Lynx system-specific definitions */
/* */
/* */
/* */
@@ -109,25 +109,25 @@ extern void lynx_160_102_16_tgi[]; /* Referred to by tgi_static_stddrv[] */
/* Sound support */
/*****************************************************************************/
void lynx_snd_init ();
void lynx_snd_init (void);
/* Initialize the sound driver */
void lynx_snd_pause ();
void lynx_snd_pause (void);
/* Pause sound */
void lynx_snd_continue ();
void lynx_snd_continue (void);
/* Continue sound after pause */
void __fastcall__ lynx_snd_play (unsigned char channel, unsigned char *music);
/* Play tune on channel */
void lynx_snd_stop ();
void lynx_snd_stop (void);
/* Stop sound on all channels */
void __fastcall__ lynx_snd_stop_channel (unsigned char channel);
/* Stop sound on all channels */
unsigned char lynx_snd_active();
unsigned char lynx_snd_active(void);
/* Show which channels are active */
/*****************************************************************************/

47
include/osic1p.h Normal file
View File

@@ -0,0 +1,47 @@
/*****************************************************************************/
/* */
/* osic1p.h */
/* */
/* Challenger 1P system specific definitions */
/* */
/* */
/* */
/* (C) 2015 Stephan Muehlstrasser */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
/* warranty. In no event will the authors be held liable for any damages */
/* arising from the use of this software. */
/* */
/* Permission is granted to anyone to use this software for any purpose, */
/* including commercial applications, and to alter it and redistribute it */
/* freely, subject to the following restrictions: */
/* */
/* 1. The origin of this software must not be misrepresented; you must not */
/* claim that you wrote the original software. If you use this software */
/* in a product, an acknowledgment in the product documentation would be */
/* appreciated but is not required. */
/* 2. Altered source versions must be plainly marked as such, and must not */
/* be misrepresented as being the original software. */
/* 3. This notice may not be removed or altered from any source */
/* distribution. */
/* */
/*****************************************************************************/
#ifndef _OSIC1P_H
#define _OSIC1P_H
/* Check for errors */
#if !defined(__OSIC1P__)
# error "This module may only be used when compiling for the Challenger 1P!"
#endif
/* The following #defines will cause the matching functions calls in conio.h
** to be overlaid by macros with the same names, saving the function call
** overhead.
*/
#define _textcolor(color) COLOR_WHITE
#define _bgcolor(color) COLOR_BLACK
#define _bordercolor(color) COLOR_BLACK
#endif

View File

@@ -107,12 +107,12 @@ int __fastcall__ atoi (const char* s);
long __fastcall__ atol (const char* s);
int __fastcall__ atexit (void (*exitfunc) (void));
void* __fastcall__ bsearch (const void* key, const void* base, size_t n,
size_t size, int (*cmp) (const void*, const void*));
size_t size, int __fastcall__ (* cmp) (const void*, const void*));
div_t __fastcall__ div (int numer, int denom);
void __fastcall__ exit (int ret) __attribute__ ((noreturn));
char* __fastcall__ getenv (const char* name);
void __fastcall__ qsort (void* base, size_t count, size_t size,
int (*compare) (const void*, const void*));
int __fastcall__ (* compare) (const void*, const void*));
long __fastcall__ strtol (const char* nptr, char** endptr, int base);
unsigned long __fastcall__ strtoul (const char* nptr, char** endptr, int base);
int __fastcall__ system (const char* s);

View File

@@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 2000-2001 Piotr Fusik <fox@scene.pl> */
/* (C) 2000-2015 Piotr Fusik <fox@scene.pl> */
/* */
/* This file is based on the zlib.h from 'zlib' general purpose compression */
/* library, version 1.1.3, (C) 1995-1998 Jean-loup Gailly and Mark Adler. */
@@ -83,8 +83,8 @@ unsigned __fastcall__ inflatemem (char* dest, const char* source);
*/
int uncompress (char* dest, unsigned* destLen,
const char* source, unsigned sourceLen);
int __fastcall__ uncompress (char* dest, unsigned* destLen,
const char* source, unsigned sourceLen);
/*
Original zlib description: