mirror of
https://github.com/LIV2/WinUAE.git
synced 2025-12-06 00:12:52 +00:00
trivial changes in several modules
This commit is contained in:
parent
3def4af6d3
commit
add7f46b1e
@ -3422,7 +3422,7 @@ void gvp_s2_add_accelerator_scsi_unit(int ch, struct uaedev_config_info *ci, str
|
||||
add_scsi_device(&wd->scsis[ch], ch, ci, rc);
|
||||
}
|
||||
|
||||
void a2091_free_device (struct wd_state *wd)
|
||||
static void a2091_free_device (struct wd_state *wd)
|
||||
{
|
||||
freencrunit(wd);
|
||||
}
|
||||
@ -3586,7 +3586,7 @@ addrbank *a2090_init (struct romconfig *rc)
|
||||
return wd->bank;
|
||||
}
|
||||
|
||||
void gvp_free_device (struct wd_state *wd)
|
||||
static void gvp_free_device (struct wd_state *wd)
|
||||
{
|
||||
freencrunit(wd);
|
||||
}
|
||||
|
||||
1
ar.cpp
1
ar.cpp
@ -213,7 +213,6 @@
|
||||
#include "savestate.h"
|
||||
#include "crc32.h"
|
||||
#include "akiko.h"
|
||||
#include "picasso96.h"
|
||||
|
||||
#define DEBUG
|
||||
#ifdef DEBUG
|
||||
|
||||
@ -116,7 +116,7 @@ int core_fputs(core_file *f, const TCHAR *s);
|
||||
|
||||
/* printf-style text write to a file */
|
||||
int core_vfprintf(core_file *f, const TCHAR *fmt, va_list va);
|
||||
int CLIB_DECL core_fprintf(core_file *f, const TCHAR *fmt, ...) ATTR_PRINTF(2,3);
|
||||
int CLIB_DECL core_fprintf(core_file *f, const TCHAR *fmt, ...);
|
||||
|
||||
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ static USHORT son[T]; /* pointers to child nodes (son[], son[] + 1) */
|
||||
|
||||
|
||||
|
||||
void Init_DEEP_Tabs(void){
|
||||
static void Init_DEEP_Tabs(void){
|
||||
USHORT i, j;
|
||||
|
||||
for (i = 0; i < N_CHAR; i++) {
|
||||
|
||||
@ -888,7 +888,7 @@ extern int ZEXPORT unzOpenCurrentFile (unzFile file)
|
||||
|
||||
if ((s->cur_file_info.compression_method!=0) &&
|
||||
(s->cur_file_info.compression_method!=Z_DEFLATED)) {
|
||||
write_log (_T("ZIP: unknown compression method %lld\n"), s->cur_file_info.compression_method);
|
||||
write_log (_T("ZIP: unknown compression method %ld\n"), s->cur_file_info.compression_method);
|
||||
err=UNZ_BADZIPFILE;
|
||||
}
|
||||
Store = s->cur_file_info.compression_method==0;
|
||||
|
||||
@ -899,7 +899,7 @@ void sample16ss_handler (void)
|
||||
/* This interpolator examines sample points when Paula switches the output
|
||||
* voltage and computes the average of Paula's output */
|
||||
|
||||
void sample16ss_anti_handler (void)
|
||||
static void sample16ss_anti_handler (void)
|
||||
{
|
||||
int data0, data1, data2, data3;
|
||||
int datas[AUDIO_CHANNELS_PAULA];
|
||||
@ -949,7 +949,7 @@ static void sample16si_anti_handler (void)
|
||||
check_sound_buffers ();
|
||||
}
|
||||
|
||||
void sample16ss_sinc_handler (void)
|
||||
static void sample16ss_sinc_handler (void)
|
||||
{
|
||||
int data0, data1, data2, data3;
|
||||
int datas[AUDIO_CHANNELS_PAULA];
|
||||
@ -1588,7 +1588,7 @@ static void audio_state_channel2 (int nr, bool perfin)
|
||||
}
|
||||
}
|
||||
|
||||
void audio_state_cda(void);
|
||||
static void audio_state_cda(void);
|
||||
|
||||
static void audio_state_channel (int nr, bool perfin)
|
||||
{
|
||||
@ -2306,7 +2306,7 @@ void audio_enable_sndboard(bool enable)
|
||||
audio_set_extra_channels();
|
||||
}
|
||||
|
||||
void audio_enable_cda(bool enable)
|
||||
static void audio_enable_cda(bool enable)
|
||||
{
|
||||
struct audio_channel_data *acd = audio_channel + AUDIO_CHANNEL_CDA_LEFT;
|
||||
if (!enable) {
|
||||
|
||||
@ -341,7 +341,6 @@ int blitter_channel_state (void)
|
||||
return channel_state (blit_cyclecounter);
|
||||
}
|
||||
|
||||
extern int is_bitplane_dma (int hpos);
|
||||
STATIC_INLINE int canblit (int hpos)
|
||||
{
|
||||
if (!dmaen (DMA_BLITTER))
|
||||
@ -953,21 +952,16 @@ STATIC_INLINE uae_u16 blitter_doblit (void)
|
||||
|
||||
STATIC_INLINE void blitter_doddma (int hpos)
|
||||
{
|
||||
int wd;
|
||||
uae_u16 d;
|
||||
|
||||
wd = 0;
|
||||
if (blit_dmacount2 == 0) {
|
||||
d = blitter_doblit ();
|
||||
wd = -1;
|
||||
} else if (ddat2use) {
|
||||
d = ddat2;
|
||||
ddat2use = 0;
|
||||
wd = 2;
|
||||
} else if (ddat1use) {
|
||||
d = ddat1;
|
||||
ddat1use = 0;
|
||||
wd = 1;
|
||||
} else {
|
||||
static int warn = 10;
|
||||
if (warn > 0) {
|
||||
|
||||
@ -431,7 +431,7 @@ static void audio_unpack (struct cdunit *cdu, struct cdtoc *t)
|
||||
static volatile int cda_bufon[2];
|
||||
static cda_audio *cda;
|
||||
|
||||
void next_cd_audio_buffer_callback(int bufnum)
|
||||
static void next_cd_audio_buffer_callback(int bufnum)
|
||||
{
|
||||
uae_sem_wait(&play_sem);
|
||||
if (bufnum >= 0) {
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
|
||||
#ifdef BSDSOCKET
|
||||
|
||||
int log_bsd;
|
||||
int log_bsd = 0;
|
||||
struct socketbase *socketbases;
|
||||
static uae_u32 SockLibBase;
|
||||
|
||||
@ -169,17 +169,17 @@ bool checksd(TrapContext *context, SB, int sd)
|
||||
if (iCounter != sd) {
|
||||
if (getsock(sb,iCounter) == s) {
|
||||
releasesock(context, sb, sd);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (iCounter = 0; iCounter < SOCKPOOLSIZE; iCounter++) {
|
||||
if (s == sockdata->sockpoolsocks[iCounter])
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
BSDTRACE((_T("checksd FALSE s 0x%x sd %d\n"),s,sd));
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void setsd(TrapContext *context, SB, int sd, SOCKET_TYPE s)
|
||||
|
||||
@ -1371,7 +1371,7 @@ void cd32_fmv_set_sync(double svpos, double adjust)
|
||||
fmv_syncadjust = adjust;
|
||||
}
|
||||
|
||||
void fmv_next_cd_audio_buffer_callback(int bufnum)
|
||||
static void fmv_next_cd_audio_buffer_callback(int bufnum)
|
||||
{
|
||||
uae_sem_wait(&play_sem);
|
||||
if (bufnum >= 0) {
|
||||
|
||||
3
cia.cpp
3
cia.cpp
@ -2207,7 +2207,6 @@ static uae_u32 REGPARAM2 clock_wget (uaecptr addr)
|
||||
|
||||
static uae_u32 REGPARAM2 clock_bget (uaecptr addr)
|
||||
{
|
||||
time_t t;
|
||||
struct tm *ct;
|
||||
uae_u8 v = 0;
|
||||
|
||||
@ -2229,7 +2228,7 @@ static uae_u32 REGPARAM2 clock_bget (uaecptr addr)
|
||||
v = regs.irc >> 8;
|
||||
return v;
|
||||
}
|
||||
t = time (0);
|
||||
time_t t = time (0);
|
||||
t += currprefs.cs_rtc_adjust;
|
||||
ct = localtime (&t);
|
||||
addr >>= 2;
|
||||
|
||||
@ -946,11 +946,12 @@ static void cyberstorm_maprom(void)
|
||||
{
|
||||
if (a3000hmem_bank.allocated <= 2 * 524288)
|
||||
return;
|
||||
if (maprom_state && is_ppc())
|
||||
if (maprom_state && is_ppc()) {
|
||||
map_banks(&blizzardmaprom2_bank, CYBERSTORM_MAPROM_BASE >> 16, 524288 >> 16, 0);
|
||||
else
|
||||
} else {
|
||||
map_banks(&blizzardmaprom_bank, CYBERSTORM_MAPROM_BASE >> 16, 524288 >> 16, 0);
|
||||
}
|
||||
}
|
||||
|
||||
static void cyberstormmk2_maprom(void)
|
||||
{
|
||||
|
||||
@ -293,7 +293,7 @@ static void mmu_dump_table(const char * label, uaecptr root_ptr)
|
||||
#endif
|
||||
|
||||
/* {{{ mmu_dump_atc */
|
||||
void mmu_dump_atc(void)
|
||||
static void mmu_dump_atc(void)
|
||||
{
|
||||
|
||||
}
|
||||
@ -750,7 +750,7 @@ uae_u32 REGPARAM2 mmu_get_ilong_unaligned(uaecptr addr)
|
||||
return res;
|
||||
}
|
||||
|
||||
uae_u16 REGPARAM2 mmu_get_lrmw_word_unaligned(uaecptr addr)
|
||||
static uae_u16 REGPARAM2 mmu_get_lrmw_word_unaligned(uaecptr addr)
|
||||
{
|
||||
uae_u16 res;
|
||||
|
||||
@ -768,7 +768,7 @@ uae_u16 REGPARAM2 mmu_get_lrmw_word_unaligned(uaecptr addr)
|
||||
return res;
|
||||
}
|
||||
|
||||
uae_u32 REGPARAM2 mmu_get_lrmw_long_unaligned(uaecptr addr)
|
||||
static uae_u32 REGPARAM2 mmu_get_lrmw_long_unaligned(uaecptr addr)
|
||||
{
|
||||
uae_u32 res;
|
||||
|
||||
|
||||
@ -1700,7 +1700,8 @@ uae_u32 mmu030_get_long_atc(uaecptr addr, int l, uae_u32 fc) {
|
||||
|
||||
return phys_get_long(physical_addr);
|
||||
}
|
||||
uae_u32 mmu030_get_ilong_atc(uaecptr addr, int l, uae_u32 fc) {
|
||||
|
||||
static uae_u32 mmu030_get_ilong_atc(uaecptr addr, int l, uae_u32 fc) {
|
||||
uae_u32 page_index = addr & mmu030.translation.page.mask;
|
||||
uae_u32 addr_mask = mmu030.translation.page.imask;
|
||||
|
||||
@ -1738,7 +1739,7 @@ uae_u16 mmu030_get_word_atc(uaecptr addr, int l, uae_u32 fc) {
|
||||
return phys_get_word(physical_addr);
|
||||
}
|
||||
|
||||
uae_u16 mmu030_get_iword_atc(uaecptr addr, int l, uae_u32 fc) {
|
||||
static uae_u16 mmu030_get_iword_atc(uaecptr addr, int l, uae_u32 fc) {
|
||||
uae_u32 page_index = addr & mmu030.translation.page.mask;
|
||||
uae_u32 addr_mask = mmu030.translation.page.imask;
|
||||
|
||||
@ -1800,6 +1801,7 @@ void mmu030_put_atc_generic(uaecptr addr, uae_u32 val, int l, uae_u32 fc, int si
|
||||
phys_put_long(physical_addr, val);
|
||||
|
||||
}
|
||||
|
||||
uae_u32 mmu030_get_atc_generic(uaecptr addr, int l, uae_u32 fc, int size, int flags, bool checkwrite) {
|
||||
uae_u32 page_index = addr & mmu030.translation.page.mask;
|
||||
uae_u32 addr_mask = mmu030.translation.page.imask;
|
||||
@ -2026,7 +2028,6 @@ uae_u8 mmu030_get_byte(uaecptr addr, uae_u32 fc) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Not commonly used access function */
|
||||
void mmu030_put_generic(uaecptr addr, uae_u32 val, uae_u32 fc, int size, int accesssize, int flags) {
|
||||
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#include "sysdeps.h"
|
||||
|
||||
#include "crc32.h"
|
||||
#include "diskutil.h"
|
||||
|
||||
#define MFMMASK 0x55555555
|
||||
static uae_u32 getmfmlong (uae_u16 * mbuf)
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#include "sysdeps.h"
|
||||
|
||||
#include "options.h"
|
||||
#include "dongle.h"
|
||||
#include "events.h"
|
||||
#include "uae.h"
|
||||
|
||||
|
||||
@ -308,7 +308,7 @@ static void clearbuffer (struct vidbuffer *dst)
|
||||
}
|
||||
}
|
||||
|
||||
void reset_decision_table (void)
|
||||
static void reset_decision_table (void)
|
||||
{
|
||||
for (int i = 0; i < sizeof linestate / sizeof *linestate; i++) {
|
||||
linestate[i] = LINE_UNDECIDED;
|
||||
@ -1039,11 +1039,11 @@ STATIC_INLINE void fill_line_16 (uae_u8 *buf, int start, int stop, bool blank)
|
||||
unsigned int i;
|
||||
unsigned int rem = 0;
|
||||
xcolnr col = getbgc (blank);
|
||||
if (((long)&b[start]) & 1)
|
||||
if (((uintptr_t)&b[start]) & 1)
|
||||
b[start++] = (uae_u16) col;
|
||||
if (start >= stop)
|
||||
return;
|
||||
if (((long)&b[stop]) & 1) {
|
||||
if (((uintptr_t)&b[stop]) & 1) {
|
||||
rem++;
|
||||
stop--;
|
||||
}
|
||||
@ -2371,7 +2371,7 @@ void init_row_map (void)
|
||||
oldgenlock = init_genlock_data;
|
||||
}
|
||||
|
||||
void init_aspect_maps (void)
|
||||
static void init_aspect_maps (void)
|
||||
{
|
||||
int i, maxl, h;
|
||||
|
||||
|
||||
33
enforcer.cpp
33
enforcer.cpp
@ -20,6 +20,8 @@
|
||||
#include "enforcer.h"
|
||||
#include "debug.h"
|
||||
|
||||
int enforcermode = 0;
|
||||
|
||||
#ifdef AHI
|
||||
|
||||
#if defined(JIT)
|
||||
@ -46,7 +48,6 @@
|
||||
extern uae_u8 *natmem_offset;
|
||||
|
||||
static int enforcer_installed = 0;
|
||||
int enforcermode = 0;
|
||||
static int enforcer_hit = 0; /* set to 1 if displaying the hit */
|
||||
|
||||
#define ENFORCER_BUF_SIZE 8192
|
||||
@ -422,7 +423,7 @@ end:
|
||||
enforcer_hit = 0;
|
||||
}
|
||||
|
||||
uae_u32 REGPARAM2 chipmem_lget2 (uaecptr addr)
|
||||
static uae_u32 REGPARAM2 chipmem_lget2 (uaecptr addr)
|
||||
{
|
||||
uae_u32 *m;
|
||||
|
||||
@ -439,7 +440,7 @@ uae_u32 REGPARAM2 chipmem_lget2 (uaecptr addr)
|
||||
return do_get_mem_long (m);
|
||||
}
|
||||
|
||||
uae_u32 REGPARAM2 chipmem_wget2(uaecptr addr)
|
||||
static uae_u32 REGPARAM2 chipmem_wget2(uaecptr addr)
|
||||
{
|
||||
uae_u16 *m;
|
||||
|
||||
@ -456,7 +457,7 @@ uae_u32 REGPARAM2 chipmem_wget2(uaecptr addr)
|
||||
return do_get_mem_word (m);
|
||||
}
|
||||
|
||||
uae_u32 REGPARAM2 chipmem_bget2 (uaecptr addr)
|
||||
static uae_u32 REGPARAM2 chipmem_bget2 (uaecptr addr)
|
||||
{
|
||||
addr -= chipmem_start_addr & chipmem_bank.mask;
|
||||
addr &= chipmem_bank.mask;
|
||||
@ -471,7 +472,7 @@ uae_u32 REGPARAM2 chipmem_bget2 (uaecptr addr)
|
||||
return chipmem_bank.baseaddr[addr];
|
||||
}
|
||||
|
||||
void REGPARAM2 chipmem_lput2 (uaecptr addr, uae_u32 l)
|
||||
static void REGPARAM2 chipmem_lput2 (uaecptr addr, uae_u32 l)
|
||||
{
|
||||
uae_u32 *m;
|
||||
|
||||
@ -491,7 +492,7 @@ void REGPARAM2 chipmem_lput2 (uaecptr addr, uae_u32 l)
|
||||
do_put_mem_long (m, l);
|
||||
}
|
||||
|
||||
void REGPARAM2 chipmem_wput2 (uaecptr addr, uae_u32 w)
|
||||
static void REGPARAM2 chipmem_wput2 (uaecptr addr, uae_u32 w)
|
||||
{
|
||||
uae_u16 *m;
|
||||
|
||||
@ -510,7 +511,7 @@ void REGPARAM2 chipmem_wput2 (uaecptr addr, uae_u32 w)
|
||||
do_put_mem_word (m, w);
|
||||
}
|
||||
|
||||
void REGPARAM2 chipmem_bput2 (uaecptr addr, uae_u32 b)
|
||||
static void REGPARAM2 chipmem_bput2 (uaecptr addr, uae_u32 b)
|
||||
{
|
||||
addr -= chipmem_start_addr & chipmem_bank.mask;
|
||||
addr &= chipmem_bank.mask;
|
||||
@ -526,21 +527,21 @@ void REGPARAM2 chipmem_bput2 (uaecptr addr, uae_u32 b)
|
||||
chipmem_bank.baseaddr[addr] = b;
|
||||
}
|
||||
|
||||
int REGPARAM2 chipmem_check2 (uaecptr addr, uae_u32 size)
|
||||
static int REGPARAM2 chipmem_check2 (uaecptr addr, uae_u32 size)
|
||||
{
|
||||
addr -= chipmem_start_addr & chipmem_bank.mask;
|
||||
addr &= chipmem_bank.mask;
|
||||
return (addr + size) <= chipmem_bank.allocated;
|
||||
}
|
||||
|
||||
uae_u8 * REGPARAM2 chipmem_xlate2 (uaecptr addr)
|
||||
static uae_u8 * REGPARAM2 chipmem_xlate2 (uaecptr addr)
|
||||
{
|
||||
addr -= chipmem_start_addr & chipmem_bank.mask;
|
||||
addr &= chipmem_bank.mask;
|
||||
return chipmem_bank.baseaddr + addr;
|
||||
}
|
||||
|
||||
uae_u32 REGPARAM2 dummy_lget2 (uaecptr addr)
|
||||
static uae_u32 REGPARAM2 dummy_lget2 (uaecptr addr)
|
||||
{
|
||||
special_mem_r;
|
||||
enforcer_display_hit (_T("LONG READ from"), m68k_getpc (), addr);
|
||||
@ -555,7 +556,7 @@ uae_u32 REGPARAM2 dummy_lget2 (uaecptr addr)
|
||||
static int warned_JIT_0xF10000 = 0;
|
||||
#endif
|
||||
|
||||
uae_u32 REGPARAM2 dummy_wget2 (uaecptr addr)
|
||||
static uae_u32 REGPARAM2 dummy_wget2 (uaecptr addr)
|
||||
{
|
||||
special_mem_r;
|
||||
|
||||
@ -576,7 +577,7 @@ uae_u32 REGPARAM2 dummy_wget2 (uaecptr addr)
|
||||
return 0xbadf;
|
||||
}
|
||||
|
||||
uae_u32 REGPARAM2 dummy_bget2 (uaecptr addr)
|
||||
static uae_u32 REGPARAM2 dummy_bget2 (uaecptr addr)
|
||||
{
|
||||
special_mem_r;
|
||||
enforcer_display_hit (_T("BYTE READ from"), m68k_getpc (), addr);
|
||||
@ -587,7 +588,7 @@ uae_u32 REGPARAM2 dummy_bget2 (uaecptr addr)
|
||||
return 0xbadedeef;
|
||||
}
|
||||
|
||||
void REGPARAM2 dummy_lput2 (uaecptr addr, uae_u32 l)
|
||||
static void REGPARAM2 dummy_lput2 (uaecptr addr, uae_u32 l)
|
||||
{
|
||||
special_mem_w;
|
||||
enforcer_display_hit (_T("LONG WRITE to"), m68k_getpc (), addr);
|
||||
@ -597,7 +598,7 @@ void REGPARAM2 dummy_lput2 (uaecptr addr, uae_u32 l)
|
||||
}
|
||||
}
|
||||
|
||||
void REGPARAM2 dummy_wput2 (uaecptr addr, uae_u32 w)
|
||||
static void REGPARAM2 dummy_wput2 (uaecptr addr, uae_u32 w)
|
||||
{
|
||||
special_mem_w;
|
||||
enforcer_display_hit (_T("WORD WRITE to"), m68k_getpc (), addr);
|
||||
@ -607,7 +608,7 @@ void REGPARAM2 dummy_wput2 (uaecptr addr, uae_u32 w)
|
||||
}
|
||||
}
|
||||
|
||||
void REGPARAM2 dummy_bput2 (uaecptr addr, uae_u32 b)
|
||||
static void REGPARAM2 dummy_bput2 (uaecptr addr, uae_u32 b)
|
||||
{
|
||||
special_mem_w;
|
||||
enforcer_display_hit (_T("BYTE WRITE to"), m68k_getpc (), addr);
|
||||
@ -617,7 +618,7 @@ void REGPARAM2 dummy_bput2 (uaecptr addr, uae_u32 b)
|
||||
}
|
||||
}
|
||||
|
||||
int REGPARAM2 dummy_check2 (uaecptr addr, uae_u32 size)
|
||||
static int REGPARAM2 dummy_check2 (uaecptr addr, uae_u32 size)
|
||||
{
|
||||
special_mem_r;
|
||||
enforcer_display_hit (_T("CHECK from "), m68k_getpc (), addr);
|
||||
|
||||
@ -126,7 +126,7 @@ extern uint16_t VGA_SC[0x100], VGA_CRTC[0x100], VGA_ATTR[0x100], VGA_GC[0x100];
|
||||
extern uint8_t updatedscreen;
|
||||
#endif
|
||||
|
||||
union _bytewordregs_ regs;
|
||||
static union _bytewordregs_ regs;
|
||||
|
||||
#if 0
|
||||
uint8_t portram[0x10000];
|
||||
|
||||
14
fpp.cpp
14
fpp.cpp
@ -566,20 +566,20 @@ static void native_set_fpucw (uae_u32 m68k_cw)
|
||||
__asm {
|
||||
fldcw word ptr x87_cw
|
||||
}
|
||||
#elif defined(X86_ASSEMBLY)
|
||||
#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
|
||||
__asm__ ("fldcw %0" : : "m" (*&x87_cw));
|
||||
#else
|
||||
#warning floating point control not specified
|
||||
#endif
|
||||
#endif /* USE_X86_FPUCW */
|
||||
#endif
|
||||
#endif
|
||||
#else
|
||||
#warning NATIVE_FPUCW not enabled
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(uae_s64) /* Close enough for government work? */
|
||||
typedef uae_s64 tointtype;
|
||||
#else
|
||||
typedef uae_s32 tointtype;
|
||||
#endif
|
||||
|
||||
static void fpu_format_error (void)
|
||||
{
|
||||
@ -1022,7 +1022,7 @@ static bool fp_is_infinity (fpdata *fpd)
|
||||
#ifdef _MSC_VER
|
||||
return !_finite (fpd->fp);
|
||||
#elif defined(HAVE_ISINF)
|
||||
return _isinf (fpd->fp);
|
||||
return isinf(fpd->fp);
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
|
||||
@ -136,7 +136,7 @@ int statvfs ();
|
||||
Return the actual number of bytes read, zero for EOF, or negative
|
||||
for an error. */
|
||||
|
||||
int safe_read (int desc, TCHAR *ptr, int len)
|
||||
static int safe_read (int desc, TCHAR *ptr, int len)
|
||||
{
|
||||
int n_chars;
|
||||
|
||||
|
||||
@ -86,39 +86,39 @@ typedef enum
|
||||
static FILE *outfile;
|
||||
static unsigned int outfile_indent = 0;
|
||||
|
||||
void set_outfile (FILE *f)
|
||||
static void set_outfile (FILE *f)
|
||||
{
|
||||
outfile = f;
|
||||
}
|
||||
|
||||
int set_indent (int indent)
|
||||
static int set_indent (int indent)
|
||||
{
|
||||
int old_indent = outfile_indent;
|
||||
outfile_indent = indent;
|
||||
return old_indent;
|
||||
}
|
||||
|
||||
void outindent(void)
|
||||
static void outindent(void)
|
||||
{
|
||||
unsigned int i;
|
||||
for (i = 0; i < outfile_indent; i++)
|
||||
fputc(' ', outfile);
|
||||
}
|
||||
|
||||
void outf(const char *s, ...)
|
||||
static void outf(const char *s, ...)
|
||||
{
|
||||
va_list ap;
|
||||
va_start(ap, s);
|
||||
vfprintf(outfile, s, ap);
|
||||
}
|
||||
|
||||
void outln (const char *s)
|
||||
static void outln (const char *s)
|
||||
{
|
||||
outindent();
|
||||
fprintf (outfile, "%s\n", s);
|
||||
}
|
||||
|
||||
void outlnf (const char *s, ...)
|
||||
static void outlnf (const char *s, ...)
|
||||
{
|
||||
va_list ap;
|
||||
outindent();
|
||||
@ -378,7 +378,7 @@ static void out_linetoscr_mode (DEPTH_T bpp, HMODE_T hmode, int aga, int spr, CM
|
||||
|
||||
if (bpp == DEPTH_16BPP && hmode != HMODE_DOUBLE && hmode != HMODE_DOUBLE2X && spr == 0) {
|
||||
outln ( "int rem;");
|
||||
outln ( "if (((long)&buf[dpix]) & 2) {");
|
||||
outln ( "if (((uintptr_t)&buf[dpix]) & 2) {");
|
||||
outln ( " uae_u32 spix_val;");
|
||||
outln ( " uae_u32 dpix_val;");
|
||||
|
||||
@ -390,7 +390,7 @@ static void out_linetoscr_mode (DEPTH_T bpp, HMODE_T hmode, int aga, int spr, CM
|
||||
outln ( "}");
|
||||
outln ( "if (dpix >= dpix_end)");
|
||||
outln ( " return spix;");
|
||||
outln ( "rem = (((long)&buf[dpix_end]) & 2);");
|
||||
outln ( "rem = (((uintptr_t)&buf[dpix_end]) & 2);");
|
||||
outln ( "if (rem)");
|
||||
outln ( " dpix_end--;");
|
||||
}
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
#define UAE_SCSI_H
|
||||
|
||||
#include "uae/types.h"
|
||||
#include "memory.h"
|
||||
|
||||
#define SCSI_DEFAULT_DATA_BUFFER_SIZE (256 * 512)
|
||||
|
||||
|
||||
70
include/uae/endian.h
Normal file
70
include/uae/endian.h
Normal file
@ -0,0 +1,70 @@
|
||||
#ifndef UAE_ENDIAN_H
|
||||
#define UAE_ENDIAN_H
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "uae/types.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
/* Use custom conversion routines for Windows */
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
#error big-endian windows not supported here
|
||||
#endif
|
||||
|
||||
#ifndef be16toh
|
||||
static inline uint16_t be16toh_impl(uint16_t v)
|
||||
{
|
||||
return (v << 8) | (v >> 8);
|
||||
}
|
||||
#define be16toh be16toh_impl
|
||||
#endif
|
||||
|
||||
#ifndef le16toh
|
||||
static inline uint16_t le16toh_impl(uint16_t v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
#define le16toh le16toh_impl
|
||||
#endif
|
||||
|
||||
#ifndef le32toh
|
||||
static inline uint32_t le32toh_impl(uint32_t v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
#define le32toh le32toh_impl
|
||||
#endif
|
||||
|
||||
#elif defined(HAVE_LIBKERN_OSBYTEORDER_H)
|
||||
|
||||
/* OS X lacks endian.h, but has something similar */
|
||||
#include <libkern/OSByteOrder.h>
|
||||
#define htobe16(x) OSSwapHostToBigInt16(x)
|
||||
#define htole16(x) OSSwapHostToLittleInt16(x)
|
||||
#define be16toh(x) OSSwapBigToHostInt16(x)
|
||||
#define le16toh(x) OSSwapLittleToHostInt16(x)
|
||||
#define htobe32(x) OSSwapHostToBigInt32(x)
|
||||
#define htole32(x) OSSwapHostToLittleInt32(x)
|
||||
#define be32toh(x) OSSwapBigToHostInt32(x)
|
||||
#define le32toh(x) OSSwapLittleToHostInt32(x)
|
||||
#define htobe64(x) OSSwapHostToBigInt64(x)
|
||||
#define htole64(x) OSSwapHostToLittleInt64(x)
|
||||
#define be64toh(x) OSSwapBigToHostInt64(x)
|
||||
#define le64toh(x) OSSwapLittleToHostInt64(x)
|
||||
|
||||
#elif defined(HAVE_ENDIAN_H)
|
||||
|
||||
/* Linux has endian.h */
|
||||
#include <endian.h>
|
||||
|
||||
#elif defined(HAVE_SYS_ENDIAN_H)
|
||||
|
||||
/* BSD's generally have sys/endian.h */
|
||||
#include <sys/endian.h>
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* UAE_ENDIAN_H */
|
||||
28
include/uae/seh.h
Normal file
28
include/uae/seh.h
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Structured exception handling
|
||||
* Copyright (C) 2014 Frode Solheim
|
||||
*
|
||||
* Licensed under the terms of the GNU General Public License version 2.
|
||||
* See the file 'COPYING' for full license text.
|
||||
*/
|
||||
|
||||
#ifndef UAE_SEH_H
|
||||
#define UAE_SEH_H
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
/* Structured exception handling is available */
|
||||
|
||||
#else
|
||||
|
||||
/* MinGW defines __try / __except */
|
||||
#undef __try
|
||||
#undef __except
|
||||
|
||||
/* Structured exception handling is not available - do nothing */
|
||||
#define __try
|
||||
#define __except(x)
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* UAE_SEH_H */
|
||||
@ -25,6 +25,7 @@
|
||||
#include "uae.h"
|
||||
#include "disk.h"
|
||||
#include "fsdb.h"
|
||||
#include "xwin.h"
|
||||
|
||||
#if INPUTRECORD_DEBUG > 0
|
||||
#include "memory.h"
|
||||
@ -56,8 +57,6 @@ static uae_u32 pcs2[16];
|
||||
extern void activate_debugger (void);
|
||||
static int warned;
|
||||
|
||||
extern void refreshtitle (void);
|
||||
|
||||
static void setlasthsync (void)
|
||||
{
|
||||
if (lasthsync / current_maxvpos () != hsync_counter / current_maxvpos ()) {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
|
||||
#include "uae/types.h"
|
||||
|
||||
#include "sysconfig.h"
|
||||
#include "sysdeps.h"
|
||||
@ -41,6 +41,7 @@ inline UINT64 mulu_32x32(UINT32 a, UINT32 b)
|
||||
{
|
||||
return (UINT64)a * (UINT64)b;
|
||||
}
|
||||
|
||||
#define NULL 0
|
||||
|
||||
class direct_read_data
|
||||
|
||||
@ -162,9 +162,6 @@ static struct ncr_state *ncr_a4000t;
|
||||
static struct ncr_state *ncra4091[MAX_DUPLICATE_EXPANSION_BOARDS];
|
||||
static struct ncr_state *ncr_wildfire;
|
||||
|
||||
extern void cyberstorm_mk3_ppc_irq(int);
|
||||
extern void blizzardppc_irq(int);
|
||||
|
||||
static void set_irq2(int level)
|
||||
{
|
||||
if (level)
|
||||
@ -390,11 +387,13 @@ static void ncr_io_bput(struct ncr_state *ncr, uaecptr addr, uae_u32 val)
|
||||
addr &= IO_MASK;
|
||||
lsi_mmio_write(ncr->devobject.lsistate, beswap(addr), val, 1);
|
||||
}
|
||||
|
||||
static void ncr710_io_bput(struct ncr_state *ncr, uaecptr addr, uae_u32 val)
|
||||
{
|
||||
addr &= IO_MASK;
|
||||
lsi710_mmio_write(ncr->devobject.lsistate, beswap(addr), val, 1);
|
||||
}
|
||||
|
||||
void cpuboard_ncr710_io_bput(uaecptr addr, uae_u32 v)
|
||||
{
|
||||
ncr710_io_bput(ncr_cpuboard, addr, v);
|
||||
@ -419,11 +418,13 @@ static uae_u32 ncr_io_bget(struct ncr_state *ncr, uaecptr addr)
|
||||
addr &= IO_MASK;
|
||||
return lsi_mmio_read(ncr->devobject.lsistate, beswap(addr), 1);
|
||||
}
|
||||
|
||||
static uae_u32 ncr710_io_bget(struct ncr_state *ncr, uaecptr addr)
|
||||
{
|
||||
addr &= IO_MASK;
|
||||
return lsi710_mmio_read(ncr->devobject.lsistate, beswap(addr), 1);
|
||||
}
|
||||
|
||||
uae_u32 cpuboard_ncr710_io_bget(uaecptr addr)
|
||||
{
|
||||
return ncr710_io_bget(ncr_cpuboard, addr);
|
||||
|
||||
@ -43,6 +43,7 @@
|
||||
#include "cpuboard.h"
|
||||
#include "threaddep/thread.h"
|
||||
#include "x86.h"
|
||||
#include "bsdsocket.h"
|
||||
#ifdef JIT
|
||||
#include "jit/compemu.h"
|
||||
#include <signal.h>
|
||||
@ -1910,7 +1911,7 @@ void REGPARAM2 MakeSR (void)
|
||||
| GET_CFLG ());
|
||||
}
|
||||
|
||||
void SetSR (uae_u16 sr)
|
||||
static void SetSR (uae_u16 sr)
|
||||
{
|
||||
regs.sr &= 0xff00;
|
||||
regs.sr |= sr;
|
||||
@ -3644,8 +3645,6 @@ static int do_specialties (int cycles)
|
||||
isstopped:
|
||||
check_uae_int_request();
|
||||
{
|
||||
extern void bsdsock_fake_int_handler (void);
|
||||
extern int volatile bsd_int_requested;
|
||||
if (bsd_int_requested)
|
||||
bsdsock_fake_int_handler ();
|
||||
}
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
|
||||
#include "options.h"
|
||||
#include "memory.h"
|
||||
#include "uae/seh.h"
|
||||
#include "custom.h"
|
||||
#include "events.h"
|
||||
#include "newcpu.h"
|
||||
@ -117,8 +118,6 @@ extern HWND hAmigaWnd;
|
||||
|
||||
static LRESULT CALLBACK SocketWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
static int PASCAL WSAEventSelect(SOCKET,HANDLE,long);
|
||||
|
||||
#define PREPARE_THREAD EnterCriticalSection(&bsd->SockThreadCS)
|
||||
#define TRIGGER_THREAD { SetEvent(bsd->hSockReq); WaitForSingleObject(bsd->hSockReqHandled, INFINITE); LeaveCriticalSection(&bsd->SockThreadCS); }
|
||||
|
||||
@ -515,7 +514,7 @@ void sockabort(SB)
|
||||
unlocksigqueue();
|
||||
}
|
||||
|
||||
void setWSAAsyncSelect(SB, uae_u32 sd, SOCKET s, long lEvent )
|
||||
static void setWSAAsyncSelect(SB, uae_u32 sd, SOCKET s, long lEvent )
|
||||
{
|
||||
if (sb->mtable[sd - 1]) {
|
||||
long wsbevents = 0;
|
||||
@ -1654,7 +1653,7 @@ int host_CloseSocket(TrapContext *context, SB, int sd)
|
||||
sb->mtable[sd-1] = 0;
|
||||
}
|
||||
|
||||
if (checksd(context, sb ,sd) == TRUE)
|
||||
if (checksd(context, sb ,sd) == true)
|
||||
return 0;
|
||||
|
||||
BEGINBLOCKING;
|
||||
|
||||
@ -4,14 +4,14 @@
|
||||
typedef void *PVOID;
|
||||
typedef char *PCHAR;
|
||||
|
||||
typedef unsigned char UBYTE;
|
||||
typedef unsigned short UWORD;
|
||||
typedef unsigned long UDWORD;
|
||||
typedef unsigned __int64 UQUAD;
|
||||
typedef signed char SBYTE;
|
||||
typedef signed short SWORD;
|
||||
typedef signed long SDWORD;
|
||||
typedef signed __int64 SQUAD;
|
||||
typedef uae_u8 UBYTE;
|
||||
typedef uae_u16 UWORD;
|
||||
typedef uae_u32 UDWORD;
|
||||
typedef uae_u64 UQUAD;
|
||||
typedef uae_s8 SBYTE;
|
||||
typedef uae_s16 SWORD;
|
||||
typedef uae_s32 SDWORD;
|
||||
typedef uae_s64 SQUAD;
|
||||
|
||||
typedef UBYTE *PUBYTE;
|
||||
typedef UWORD *PUWORD;
|
||||
|
||||
@ -153,7 +153,7 @@ cda_audio::cda_audio(int num_sectors, int sectorsize, int samplerate)
|
||||
}
|
||||
this->num_sectors = num_sectors;
|
||||
for (int i = 0; i < 2; i++) {
|
||||
memset (&whdr[i], 0, sizeof WAVEHDR);
|
||||
memset (&whdr[i], 0, sizeof(WAVEHDR));
|
||||
whdr[i].dwBufferLength = sectorsize * num_sectors;
|
||||
whdr[i].lpData = (LPSTR)buffers[i];
|
||||
mmr = waveOutPrepareHeader (wavehandle, &whdr[i], sizeof (WAVEHDR));
|
||||
|
||||
@ -402,12 +402,12 @@ static bool test_rawinput (int usage)
|
||||
|
||||
rid.usUsagePage = 1;
|
||||
rid.usUsage = usage;
|
||||
if (RegisterRawInputDevices (&rid, 1, sizeof RAWINPUTDEVICE) == FALSE) {
|
||||
if (RegisterRawInputDevices (&rid, 1, sizeof(RAWINPUTDEVICE)) == FALSE) {
|
||||
write_log (_T("RAWINPUT test failed, usage=%d ERR=%d\n"), usage, GetLastError ());
|
||||
return false;
|
||||
}
|
||||
rid.dwFlags |= RIDEV_REMOVE;
|
||||
if (RegisterRawInputDevices (&rid, 1, sizeof RAWINPUTDEVICE) == FALSE) {
|
||||
if (RegisterRawInputDevices (&rid, 1, sizeof(RAWINPUTDEVICE)) == FALSE) {
|
||||
write_log (_T("RAWINPUT test failed (release), usage=%d, ERR=%d\n"), usage, GetLastError ());
|
||||
return false;
|
||||
}
|
||||
@ -501,7 +501,7 @@ static int doregister_rawinput (void)
|
||||
if (!add)
|
||||
rawinput_reg = -rawinput_reg;
|
||||
//write_log (_T("+++++++++++++++++++++++++++%x\n"), hMainWnd);
|
||||
if (RegisterRawInputDevices (rid, num, sizeof RAWINPUTDEVICE) == FALSE) {
|
||||
if (RegisterRawInputDevices (rid, num, sizeof(RAWINPUTDEVICE)) == FALSE) {
|
||||
write_log (_T("RAWINPUT %sregistration failed %d\n"),
|
||||
add ? _T("") : _T("un"), GetLastError ());
|
||||
return 0;
|
||||
@ -1118,7 +1118,7 @@ static void rawinputfriendlynames (void)
|
||||
for (i = 0; SetupDiEnumDeviceInfo (di, i, &dd); i++) {
|
||||
TCHAR devpath[MAX_DPATH];
|
||||
DWORD size = 0;
|
||||
if (SetupDiGetDeviceInstanceId (di, &dd, devpath, sizeof devpath / sizeof TCHAR , &size)) {
|
||||
if (SetupDiGetDeviceInstanceId (di, &dd, devpath, sizeof devpath / sizeof(TCHAR), &size)) {
|
||||
DEVINST devinst = dd.DevInst;
|
||||
|
||||
TCHAR *cg = outGUID (&guid[ii]);
|
||||
@ -1127,15 +1127,15 @@ static void rawinputfriendlynames (void)
|
||||
ULONG size2;
|
||||
TCHAR bufguid[MAX_DPATH];
|
||||
|
||||
size2 = sizeof bufguid / sizeof TCHAR;
|
||||
size2 = sizeof bufguid / sizeof(TCHAR);
|
||||
if (CM_Get_DevNode_Registry_Property (devinst, CM_DRP_CLASSGUID, NULL, bufguid, &size2, 0) != CR_SUCCESS)
|
||||
break;
|
||||
if (_tcsicmp (cg, bufguid))
|
||||
break;
|
||||
|
||||
size2 = sizeof devname / sizeof TCHAR;
|
||||
size2 = sizeof devname / sizeof(TCHAR);
|
||||
if (CM_Get_DevNode_Registry_Property (devinst, CM_DRP_FRIENDLYNAME, NULL, devname, &size2, 0) != CR_SUCCESS) {
|
||||
ULONG size2 = sizeof devname / sizeof TCHAR;
|
||||
ULONG size2 = sizeof devname / sizeof(TCHAR);
|
||||
if (CM_Get_DevNode_Registry_Property (devinst, CM_DRP_DEVICEDESC, NULL, devname, &size2, 0) != CR_SUCCESS)
|
||||
devname[0] = 0;
|
||||
}
|
||||
@ -1818,7 +1818,7 @@ static bool initialize_rawinput (void)
|
||||
did->axisname[axiscnt] = my_strdup (tmp);
|
||||
did->axissort[axiscnt] = hidtable[ht].priority * 2 + l;
|
||||
did->axismappings[axiscnt] = acnt;
|
||||
memcpy (&did->hidvcaps[axiscnt], &vcaps[i], sizeof HIDP_VALUE_CAPS);
|
||||
memcpy (&did->hidvcaps[axiscnt], &vcaps[i], sizeof(HIDP_VALUE_CAPS));
|
||||
did->axistype[axiscnt] = l + 1;
|
||||
axiscnt++;
|
||||
}
|
||||
@ -1827,7 +1827,7 @@ static bool initialize_rawinput (void)
|
||||
did->axissort[axiscnt] = hidtable[ht].priority * 2;
|
||||
did->axisname[axiscnt] = my_strdup (hidtable[ht].name);
|
||||
did->axismappings[axiscnt] = acnt;
|
||||
memcpy (&did->hidvcaps[axiscnt], &vcaps[i], sizeof HIDP_VALUE_CAPS);
|
||||
memcpy (&did->hidvcaps[axiscnt], &vcaps[i], sizeof(HIDP_VALUE_CAPS));
|
||||
fixhidvcaps (&rdi->hid, &did->hidvcaps[axiscnt]);
|
||||
did->axistype[axiscnt] = hidtable[ht].type;
|
||||
axiscnt++;
|
||||
@ -2120,8 +2120,8 @@ static void handle_rawinput_2 (RAWINPUT *raw)
|
||||
}
|
||||
}
|
||||
}
|
||||
memcpy (did->prevusagelist, did->usagelist, usagelength * sizeof USAGE_AND_PAGE);
|
||||
memset (did->prevusagelist + usagelength, 0, (did->maxusagelistlength - usagelength) * sizeof USAGE_AND_PAGE);
|
||||
memcpy (did->prevusagelist, did->usagelist, usagelength * sizeof(USAGE_AND_PAGE));
|
||||
memset (did->prevusagelist + usagelength, 0, (did->maxusagelistlength - usagelength) * sizeof(USAGE_AND_PAGE));
|
||||
for (int axisnum = 0; axisnum < did->axles; axisnum++) {
|
||||
ULONG val;
|
||||
int usage = did->axismappings[axisnum];
|
||||
@ -3670,8 +3670,8 @@ static void read_joystick (void)
|
||||
write_log (_T("%d/%d OFF\n"), did->prevusagelist[j].UsagePage, did->prevusagelist[j].Usage);
|
||||
}
|
||||
}
|
||||
memcpy (did->prevusagelist, did->usagelist, usagelength * sizeof USAGE_AND_PAGE);
|
||||
memset (did->prevusagelist + usagelength, 0, (did->maxusagelistlength - usagelength) * sizeof USAGE_AND_PAGE);
|
||||
memcpy (did->prevusagelist, did->usagelist, usagelength * sizeof(USAGE_AND_PAGE));
|
||||
memset (did->prevusagelist + usagelength, 0, (did->maxusagelistlength - usagelength) * sizeof(USAGE_AND_PAGE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -144,4 +144,3 @@ int dx_islost (void);
|
||||
#define DDFORCED_SYSMEM 3
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@ -43,6 +43,11 @@
|
||||
//#define DBG_KEYBD 1
|
||||
//#define DEBUG_KBD
|
||||
|
||||
#ifndef DIK_PREVTRACK
|
||||
/* Not defined by MinGW */
|
||||
#define DIK_PREVTRACK 0x90
|
||||
#endif
|
||||
|
||||
static struct uae_input_device_kbr_default keytrans_amiga[] = {
|
||||
|
||||
{ DIK_ESCAPE, INPUTEVENT_KEY_ESC },
|
||||
|
||||
@ -9,6 +9,8 @@
|
||||
* Modified 2005 Peter Keunecke
|
||||
*/
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#define FPCR_ROUNDING_MODE 0x00000030
|
||||
#define FPCR_ROUND_NEAR 0x00000000
|
||||
#define FPCR_ROUND_ZERO 0x00000010
|
||||
@ -174,8 +176,13 @@ STATIC_INLINE double to_double_x(uae_u32 wrd1, uae_u32 wrd2)
|
||||
uae_u32 u[2];
|
||||
} val;
|
||||
|
||||
val.u[0] = wrd2; // little endian
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
val.u[0] = wrd1;
|
||||
val.u[1] = wrd2;
|
||||
#else
|
||||
val.u[1] = wrd1;
|
||||
val.u[0] = wrd2;
|
||||
#endif
|
||||
return val.d;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -23,6 +23,8 @@ void flushprinter (void);
|
||||
int checkserwrite (int spaceneeded);
|
||||
void serialuartbreak (int);
|
||||
|
||||
void hsyncstuff(void);
|
||||
|
||||
void shmem_serial_delete(void);
|
||||
bool shmem_serial_create(void);
|
||||
int shmem_serial_state(void);
|
||||
@ -43,7 +45,7 @@ extern int load_ghostscript (void);
|
||||
struct midiportinfo
|
||||
{
|
||||
TCHAR *name;
|
||||
UINT devid;
|
||||
unsigned int devid;
|
||||
};
|
||||
extern struct midiportinfo *midiinportinfo[MAX_MIDI_PORTS];
|
||||
extern struct midiportinfo *midioutportinfo[MAX_MIDI_PORTS];
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
typedef struct UAEREG {
|
||||
HKEY fkey;
|
||||
TCHAR *inipath;
|
||||
|
||||
@ -312,7 +312,7 @@ int screenshot_prepare (void)
|
||||
void Screenshot_RGBinfo (int rb, int gb, int bb, int rs, int gs, int bs)
|
||||
{
|
||||
if (!bi)
|
||||
bi = xcalloc (BITMAPINFO, sizeof BITMAPINFO + 256 * sizeof RGBQUAD);
|
||||
bi = xcalloc (BITMAPINFO, sizeof(BITMAPINFO) + 256 * sizeof(RGBQUAD));
|
||||
rgb_rb = rb;
|
||||
rgb_gb = gb;
|
||||
rgb_bb = rb;
|
||||
@ -389,16 +389,16 @@ static int savebmp (FILE *fp)
|
||||
BITMAPFILEHEADER bfh;
|
||||
// write the file header, bitmap information and pixel data
|
||||
bfh.bfType = 19778;
|
||||
bfh.bfSize = sizeof (BITMAPFILEHEADER) + sizeof (BITMAPINFOHEADER) + (bi->bmiHeader.biClrUsed * sizeof RGBQUAD) + bi->bmiHeader.biSizeImage;
|
||||
bfh.bfSize = sizeof (BITMAPFILEHEADER) + sizeof (BITMAPINFOHEADER) + (bi->bmiHeader.biClrUsed * sizeof(RGBQUAD)) + bi->bmiHeader.biSizeImage;
|
||||
bfh.bfReserved1 = 0;
|
||||
bfh.bfReserved2 = 0;
|
||||
bfh.bfOffBits = sizeof (BITMAPFILEHEADER) + sizeof (BITMAPINFOHEADER) + bi->bmiHeader.biClrUsed * sizeof RGBQUAD;
|
||||
bfh.bfOffBits = sizeof (BITMAPFILEHEADER) + sizeof (BITMAPINFOHEADER) + bi->bmiHeader.biClrUsed * sizeof(RGBQUAD);
|
||||
if (fwrite (&bfh, 1, sizeof (BITMAPFILEHEADER), fp) < sizeof (BITMAPFILEHEADER))
|
||||
return 0; // failed to write bitmap file header
|
||||
if (fwrite (bi, 1, sizeof (BITMAPINFOHEADER), fp) < sizeof (BITMAPINFOHEADER))
|
||||
return 0; // failed to write bitmap infomation header
|
||||
if (bi->bmiHeader.biClrUsed) {
|
||||
if (fwrite (bi->bmiColors, 1, bi->bmiHeader.biClrUsed * sizeof RGBQUAD, fp) < bi->bmiHeader.biClrUsed * sizeof RGBQUAD)
|
||||
if (fwrite (bi->bmiColors, 1, bi->bmiHeader.biClrUsed * sizeof(RGBQUAD), fp) < bi->bmiHeader.biClrUsed * sizeof(RGBQUAD))
|
||||
return 0; // failed to write bitmap file header
|
||||
}
|
||||
if (fwrite (lpvBits, 1, bi->bmiHeader.biSizeImage, fp) < bi->bmiHeader.biSizeImage)
|
||||
|
||||
@ -175,7 +175,6 @@ float scaled_sample_evtime_orig;
|
||||
extern float sampler_evtime;
|
||||
|
||||
void update_sound (double clk)
|
||||
|
||||
{
|
||||
if (!have_sound)
|
||||
return;
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
typedef HANDLE uae_sem_t;
|
||||
typedef HANDLE uae_thread_id;
|
||||
|
||||
|
||||
52
ppc/ppcd.cpp
52
ppc/ppcd.cpp
@ -58,7 +58,7 @@ static PPCD_CB *o;
|
||||
#define Rc LK
|
||||
|
||||
// GPRs. sp, sd1 and sd2 are named corresponding to PPC EABI.
|
||||
static char *regname[] = {
|
||||
static const char *regname[] = {
|
||||
#ifdef UPPERCASE
|
||||
"R0" , "R1" , "R2", "R3" , "R4" , "R5" , "R6" , "R7" ,
|
||||
"R8" , "R9" , "R10", "R11", "R12", "R13", "R14", "R15",
|
||||
@ -104,7 +104,7 @@ static char * simm(int val, int hex, int s)
|
||||
}
|
||||
|
||||
// Simple instruction form + reserved bitmask.
|
||||
static void put(char * mnem, u32 mask, u32 chkval=0, int iclass=PPC_DISA_OTHER)
|
||||
static void put(const char * mnem, u32 mask, u32 chkval=0, int iclass=PPC_DISA_OTHER)
|
||||
{
|
||||
if( (Instr & mask) != chkval ) { ill(); return; }
|
||||
o->iclass |= iclass;
|
||||
@ -112,7 +112,7 @@ static void put(char * mnem, u32 mask, u32 chkval=0, int iclass=PPC_DISA_OTHER)
|
||||
}
|
||||
|
||||
// Simplified mnemonic trap conditions
|
||||
static char * t_cond[32] = {
|
||||
static const char * t_cond[32] = {
|
||||
NULL, "lgt", "llt", NULL, "eq", "lge", "lle", NULL,
|
||||
"gt", NULL, NULL, NULL, "ge", NULL, NULL, NULL,
|
||||
"lt", NULL, NULL, NULL, "le", NULL, NULL, NULL,
|
||||
@ -182,7 +182,7 @@ static void trap(int L, int imm)
|
||||
// dab LSB bits : [D][A][B] (D should always present)
|
||||
// 'hex' for logic opcodes, 's' for alu opcodes, 'crfD' and 'L' for cmp opcodes
|
||||
// 'imm': 1 to show immediate operand
|
||||
static void integer(char *mnem, char form, int dab, int hex=0, int s=1, int crfD=0, int L=0, int imm=1)
|
||||
static void integer(const char *mnem, char form, int dab, int hex=0, int s=1, int crfD=0, int L=0, int imm=1)
|
||||
{
|
||||
char * ptr = o->operands;
|
||||
int rd = DIS_RD, ra = DIS_RA, rb = DIS_RB;
|
||||
@ -264,7 +264,7 @@ static void integer(char *mnem, char form, int dab, int hex=0, int s=1, int crfD
|
||||
}
|
||||
|
||||
// Compare instructions (wraps to integer call)
|
||||
static void cmp(char *l, char *i)
|
||||
static void cmp(const char *l, const char *i)
|
||||
{
|
||||
char mnem[sizeof(o->mnemonic)];
|
||||
int rd = DIS_RD;
|
||||
@ -289,7 +289,7 @@ static void cmp(char *l, char *i)
|
||||
}
|
||||
|
||||
// Add immediate (wraps to integer call)
|
||||
static void addi(char *suffix)
|
||||
static void addi(const char *suffix)
|
||||
{
|
||||
char mnem[sizeof(o->mnemonic)];
|
||||
|
||||
@ -329,15 +329,15 @@ static void addi(char *suffix)
|
||||
}
|
||||
|
||||
// Branch suffix: AA || LK.
|
||||
static char *b_opt[4] = { "", "l", "a", "la" };
|
||||
static const char *b_opt[4] = { "", "l", "a", "la" };
|
||||
|
||||
// Branch condition code: 4 * BO[1] + (BI & 3)
|
||||
static char * b_cond[8] = {
|
||||
static const char * b_cond[8] = {
|
||||
"ge", "le", "ne", "ns", "lt", "gt", "eq", "so"
|
||||
};
|
||||
|
||||
// Branch on CTR code: BO[0..3]
|
||||
static char * b_ctr[16] = {
|
||||
static const char * b_ctr[16] = {
|
||||
"dnzf", "dzf", NULL, NULL, "dnzt", "dzt", NULL, NULL,
|
||||
"dnz", "dz", NULL, NULL, NULL, NULL, NULL, NULL
|
||||
};
|
||||
@ -381,7 +381,7 @@ static void bcx(int Disp, int L)
|
||||
if(Disp)
|
||||
{
|
||||
bd = DIS_UIMM & ~3;
|
||||
if(bd & 0x8000) bd |= 0xffffffffffff0000;
|
||||
if(bd & 0x8000) bd |= 0xffffffffffff0000LL;
|
||||
o->target = (AA ? 0 : DIS_PC) + bd;
|
||||
}
|
||||
else o->target = 0;
|
||||
@ -405,7 +405,7 @@ static void bcx(int Disp, int L)
|
||||
{
|
||||
if(bo & 2) { ill(); return; } // BO[3]
|
||||
#ifdef SIMPLIFIED
|
||||
char *cond = b_cond[((bo & 8) >> 1) | (bi & 3)];
|
||||
const char *cond = b_cond[((bo & 8) >> 1) | (bi & 3)];
|
||||
if(cond != NULL) // BO[1]
|
||||
{
|
||||
sprintf(o->mnemonic, "b%s%s%s%c", cond, r, b_opt[Disp ? AALK : LK], y);
|
||||
@ -444,7 +444,7 @@ static void bx(void)
|
||||
{
|
||||
// Calculate displacement and target address
|
||||
u64 bd = Instr & 0x03fffffc;
|
||||
if(bd & 0x02000000) bd |= 0xfffffffffc000000;
|
||||
if(bd & 0x02000000) bd |= 0xfffffffffc000000LL;
|
||||
o->target = (AA ? 0 : DIS_PC) + bd;
|
||||
|
||||
o->iclass |= PPC_DISA_BRANCH;
|
||||
@ -461,7 +461,7 @@ static void mcrf(void)
|
||||
}
|
||||
|
||||
// CR logic operations
|
||||
static void crop(char *name, char *simp="", int ddd=0, int daa=0)
|
||||
static void crop(const char *name, const char *simp="", int ddd=0, int daa=0)
|
||||
{
|
||||
if(Instr & 1) { ill(); return; }
|
||||
|
||||
@ -506,7 +506,7 @@ static void crop(char *name, char *simp="", int ddd=0, int daa=0)
|
||||
}
|
||||
|
||||
// Rotate left word.
|
||||
static void rlw(char *name, int rb, int ins=0)
|
||||
static void rlw(const char *name, int rb, int ins=0)
|
||||
{
|
||||
int mb = DIS_MB, me = DIS_ME;
|
||||
char * ptr = o->operands;
|
||||
@ -564,7 +564,7 @@ static void rld(char *name, int rb, int mtype)
|
||||
}
|
||||
|
||||
// Load/Store.
|
||||
static void ldst(char *name, int x/*indexed*/, int load=1, int L=0, int string=0, int fload=0)
|
||||
static void ldst(const char *name, int x/*indexed*/, int load=1, int L=0, int string=0, int fload=0)
|
||||
{
|
||||
if(x) integer(name, fload ? 'F' : 'X', DAB_D|DAB_A|DAB_B);
|
||||
else
|
||||
@ -586,7 +586,7 @@ static void ldst(char *name, int x/*indexed*/, int load=1, int L=0, int string=0
|
||||
}
|
||||
|
||||
// Cache.
|
||||
static void cache(char *name, int flag=PPC_DISA_OTHER)
|
||||
static void cache(const char *name, int flag=PPC_DISA_OTHER)
|
||||
{
|
||||
if (DIS_RD) { ill(); return; }
|
||||
else
|
||||
@ -600,7 +600,7 @@ static void cache(char *name, int flag=PPC_DISA_OTHER)
|
||||
}
|
||||
}
|
||||
|
||||
static void movesr(char *name, int from, int L, int xform)
|
||||
static void movesr(const char *name, int from, int L, int xform)
|
||||
{
|
||||
int reg = DIS_RD, sreg = DIS_RA & 0xF, regb = DIS_RB;
|
||||
|
||||
@ -660,7 +660,7 @@ static void mcrxr(void)
|
||||
o->r[0] = DIS_RD >> 2;
|
||||
}
|
||||
|
||||
static char *spr_name(int n)
|
||||
static const char *spr_name(int n)
|
||||
{
|
||||
static char def[8];
|
||||
|
||||
@ -758,7 +758,7 @@ static char *spr_name(int n)
|
||||
return def;
|
||||
}
|
||||
|
||||
static char *tbr_name(int n)
|
||||
static const char *tbr_name(int n)
|
||||
{
|
||||
static char def[8];
|
||||
|
||||
@ -776,7 +776,7 @@ static char *tbr_name(int n)
|
||||
static void movespr(int from)
|
||||
{
|
||||
int spr = (DIS_RB << 5) | DIS_RA, f = 1;
|
||||
char *fix;
|
||||
const char *fix;
|
||||
|
||||
if( !((spr == 1) || (spr == 8) || (spr == 9)) ) o->iclass |= PPC_DISA_OEA;
|
||||
|
||||
@ -813,7 +813,7 @@ static void movespr(int from)
|
||||
static void movetbr(void)
|
||||
{
|
||||
int tbr = (DIS_RB << 5) | DIS_RA, f = 1;
|
||||
char *fix;
|
||||
const char *fix;
|
||||
|
||||
// Handle simplified mnemonic
|
||||
if (tbr == 268) { fix = "tbl"; o->iclass |= PPC_DISA_SIMPLIFIED; }
|
||||
@ -857,7 +857,7 @@ static void sradi(void)
|
||||
o->iclass = PPC_DISA_INTEGER | PPC_DISA_64;
|
||||
}
|
||||
|
||||
static void lsswi(char *name)
|
||||
static void lsswi(const char *name)
|
||||
{
|
||||
int rd = DIS_RD, ra = DIS_RA, nb = DIS_RB;
|
||||
strcpy (o->mnemonic, name);
|
||||
@ -874,7 +874,7 @@ static void lsswi(char *name)
|
||||
#define FPU_DACB 4
|
||||
#define FPU_D 5
|
||||
|
||||
static void fpu(char *name, u32 mask, int type, int flag=PPC_DISA_OTHER)
|
||||
static void fpu(const char *name, u32 mask, int type, int flag=PPC_DISA_OTHER)
|
||||
{
|
||||
int d = DIS_RD, a = DIS_RA, c = DIS_RC, b = DIS_RB;
|
||||
|
||||
@ -909,7 +909,7 @@ static void fpu(char *name, u32 mask, int type, int flag=PPC_DISA_OTHER)
|
||||
o->iclass = PPC_DISA_FPU | flag;
|
||||
}
|
||||
|
||||
static void fcmp(char *name)
|
||||
static void fcmp(const char *name)
|
||||
{
|
||||
int crfd = DIS_RD >> 2, ra = DIS_RA, rb = DIS_RB;
|
||||
|
||||
@ -933,7 +933,7 @@ static void mtfsf(void)
|
||||
o->iclass = PPC_DISA_FPU;
|
||||
}
|
||||
|
||||
static void mtfsb(char *name)
|
||||
static void mtfsb(const char *name)
|
||||
{
|
||||
int crbd = DIS_RD;
|
||||
|
||||
@ -1766,6 +1766,6 @@ char *PPCDisasmSimple(u64 pc, u32 instr)
|
||||
dis_out.instr = instr;
|
||||
|
||||
PPCDisasm(&dis_out);
|
||||
sprintf(output, "%08X %08X %-10s %s", pc, instr, dis_out.mnemonic, dis_out.operands);
|
||||
sprintf(output, "%08llX %08X %-10s %s", pc, instr, dis_out.mnemonic, dis_out.operands);
|
||||
return output;
|
||||
}
|
||||
|
||||
@ -6,10 +6,10 @@
|
||||
|
||||
typedef signed char s8;
|
||||
typedef signed short s16;
|
||||
typedef signed long s32;
|
||||
typedef signed int s32;
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned long u32;
|
||||
typedef unsigned int u32;
|
||||
typedef float f32;
|
||||
typedef double f64;
|
||||
|
||||
|
||||
@ -72,9 +72,13 @@ inline int c99_snprintf(char* str, size_t size, const char* format, ...)
|
||||
#define ABS(x) abs(x)
|
||||
#endif
|
||||
|
||||
#ifdef USE_GLIB
|
||||
#include <glib.h>
|
||||
#else
|
||||
#define g_free free
|
||||
#define g_malloc malloc
|
||||
#define g_new(type, num) ((type*)calloc(sizeof(type),num))
|
||||
#endif
|
||||
|
||||
enum device_endian {
|
||||
DEVICE_NATIVE_ENDIAN,
|
||||
|
||||
@ -257,7 +257,6 @@ TCHAR *restore_path_func (uae_u8 **dstp, int type)
|
||||
{
|
||||
TCHAR *newpath;
|
||||
TCHAR *s;
|
||||
TCHAR *out = NULL;
|
||||
TCHAR tmp[MAX_DPATH], tmp2[MAX_DPATH];
|
||||
|
||||
s = restore_string_func (dstp);
|
||||
@ -302,13 +301,13 @@ TCHAR *restore_path_func (uae_u8 **dstp, int type)
|
||||
|
||||
/* read and write IFF-style hunks */
|
||||
|
||||
static void save_chunk (struct zfile *f, uae_u8 *chunk, size_t len, TCHAR *name, int compress)
|
||||
static void save_chunk (struct zfile *f, uae_u8 *chunk, unsigned int len, const TCHAR *name, int compress)
|
||||
{
|
||||
uae_u8 tmp[8], *dst;
|
||||
uae_u8 zero[4]= { 0, 0, 0, 0 };
|
||||
uae_u32 flags;
|
||||
size_t pos;
|
||||
size_t chunklen, len2;
|
||||
unsigned int pos;
|
||||
unsigned int chunklen, len2;
|
||||
char *s;
|
||||
|
||||
if (!chunk)
|
||||
@ -365,10 +364,10 @@ static void save_chunk (struct zfile *f, uae_u8 *chunk, size_t len, TCHAR *name,
|
||||
if (len2)
|
||||
zfile_fwrite (zero, 1, len2, f);
|
||||
|
||||
write_log (_T("Chunk '%s' chunk size %d (%d)\n"), name, chunklen, len);
|
||||
write_log (_T("Chunk '%s' chunk size %u (%u)\n"), name, chunklen, len);
|
||||
}
|
||||
|
||||
static uae_u8 *restore_chunk (struct zfile *f, TCHAR *name, size_t *len, size_t *totallen, size_t *filepos)
|
||||
static uae_u8 *restore_chunk (struct zfile *f, TCHAR *name, unsigned int *len, unsigned int *totallen, size_t *filepos)
|
||||
{
|
||||
uae_u8 tmp[6], dummy[4], *mem, *src;
|
||||
uae_u32 flags;
|
||||
@ -497,7 +496,7 @@ void restore_state (const TCHAR *filename)
|
||||
struct zfile *f;
|
||||
uae_u8 *chunk,*end;
|
||||
TCHAR name[5];
|
||||
size_t len, totallen;
|
||||
unsigned int len, totallen;
|
||||
size_t filepos, filesize;
|
||||
int z3num;
|
||||
|
||||
@ -526,7 +525,7 @@ void restore_state (const TCHAR *filename)
|
||||
for (;;) {
|
||||
name[0] = 0;
|
||||
chunk = end = restore_chunk (f, name, &len, &totallen, &filepos);
|
||||
write_log (_T("Chunk '%s' size %d (%d)\n"), name, len, totallen);
|
||||
write_log (_T("Chunk '%s' size %u (%u)\n"), name, len, totallen);
|
||||
if (!_tcscmp (name, _T("END "))) {
|
||||
#ifdef _DEBUG
|
||||
if (filesize > filepos + 8)
|
||||
@ -721,7 +720,7 @@ void restore_state (const TCHAR *filename)
|
||||
write_log (_T("Chunk '%s', size %d bytes was not accepted!\n"),
|
||||
name, len);
|
||||
else if (totallen != end - chunk)
|
||||
write_log (_T("Chunk '%s' total size %d bytes but read %d bytes!\n"),
|
||||
write_log (_T("Chunk '%s' total size %d bytes but read %ld bytes!\n"),
|
||||
name, totallen, end - chunk);
|
||||
xfree (chunk);
|
||||
}
|
||||
@ -1198,7 +1197,7 @@ int savestate_dorewind (int pos)
|
||||
pos = replaycounter - 1;
|
||||
if (canrewind (pos)) {
|
||||
savestate_state = STATE_DOREWIND;
|
||||
write_log (_T("dorewind %d (%010d/%03d) -> %d\n"), replaycounter - 1, hsync_counter, vsync_counter, pos);
|
||||
write_log (_T("dorewind %d (%010ld/%03ld) -> %d\n"), replaycounter - 1, hsync_counter, vsync_counter, pos);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@ -1342,7 +1341,7 @@ void savestate_rewind (void)
|
||||
return;
|
||||
}
|
||||
inprec_setposition (st->inprecoffset, pos);
|
||||
write_log (_T("state %d restored. (%010d/%03d)\n"), pos, hsync_counter, vsync_counter);
|
||||
write_log (_T("state %d restored. (%010ld/%03ld)\n"), pos, hsync_counter, vsync_counter);
|
||||
if (rewind) {
|
||||
replaycounter--;
|
||||
if (replaycounter < 0)
|
||||
@ -1729,7 +1728,7 @@ retry2:
|
||||
staterecords_first -= staterecords_max;
|
||||
}
|
||||
|
||||
write_log (_T("state capture %d (%010d/%03d,%d/%d) (%d bytes, alloc %d)\n"),
|
||||
write_log (_T("state capture %d (%010ld/%03ld,%ld/%d) (%ld bytes, alloc %d)\n"),
|
||||
replaycounter, hsync_counter, vsync_counter,
|
||||
hsync_counter % current_maxvpos (), current_maxvpos (),
|
||||
st->end - st->data, statefile_alloc);
|
||||
|
||||
14
scp.cpp
14
scp.cpp
@ -15,22 +15,10 @@
|
||||
#include "zfile.h"
|
||||
#include "gui.h"
|
||||
#include "uae.h"
|
||||
#include "uae/endian.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <endian.h>
|
||||
#else
|
||||
static uint16_t be16toh(uint16_t v)
|
||||
{
|
||||
return (v << 8) | (v >> 8);
|
||||
}
|
||||
static uint32_t le32toh(uint32_t v)
|
||||
{
|
||||
return v;
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MAX_REVS 5
|
||||
|
||||
enum pll_mode {
|
||||
|
||||
2
scsi.cpp
2
scsi.cpp
@ -2989,13 +2989,13 @@ static void REGPARAM2 ncr80_bput(struct soft_scsi *ncr, uaecptr addr, uae_u32 b)
|
||||
ncr80_bput2(ncr, addr, b, 1);
|
||||
}
|
||||
|
||||
|
||||
static void REGPARAM2 soft_generic_bput (uaecptr addr, uae_u32 b)
|
||||
{
|
||||
struct soft_scsi *ncr = getscsiboard(addr);
|
||||
if (ncr)
|
||||
ncr80_bput(ncr, addr, b);
|
||||
}
|
||||
|
||||
static void REGPARAM2 soft_generic_wput (uaecptr addr, uae_u32 b)
|
||||
{
|
||||
struct soft_scsi *ncr = getscsiboard(addr);
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
|
||||
#include "options.h"
|
||||
#include "filesys.h"
|
||||
#include "scsi.h"
|
||||
#include "blkdev.h"
|
||||
#include "zfile.h"
|
||||
#include "memory.h"
|
||||
|
||||
@ -1381,8 +1381,4 @@ Exit:;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1568,7 +1568,8 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst, bool doublelines
|
||||
yend = isntsc ? MAXVPOS_NTSC : MAXVPOS_PAL;
|
||||
|
||||
uae_u8 r, g, b;
|
||||
uae_u8 or, og, ob;
|
||||
/* or is an alternative operator and cannot be used as an identifier */
|
||||
uae_u8 or_, og, ob;
|
||||
int pcnt = 0;
|
||||
int bank = 0;
|
||||
int mode_active = 0;
|
||||
@ -1640,7 +1641,7 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst, bool doublelines
|
||||
if (mode_active) {
|
||||
if (cookie_line || x < cookiestartx) {
|
||||
r = g = b = 0;
|
||||
or = og = ob = 0;
|
||||
or_ = og = ob = 0;
|
||||
} else {
|
||||
if (mode_active == ham_e_magic_cookie_reg) {
|
||||
uae_u8 *pal = &graffiti_palette[val * 4];
|
||||
@ -1670,7 +1671,7 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst, bool doublelines
|
||||
if (hameplus) {
|
||||
uae_u8 ar, ag, ab;
|
||||
|
||||
ar = (r + or) / 2;
|
||||
ar = (r + or_) / 2;
|
||||
ag = (g + og) / 2;
|
||||
ab = (b + ob) / 2;
|
||||
|
||||
@ -1693,7 +1694,7 @@ static bool ham_e(struct vidbuffer *src, struct vidbuffer *dst, bool doublelines
|
||||
PRGB(dst, d2, r, g, b);
|
||||
}
|
||||
}
|
||||
or = r;
|
||||
or_ = r;
|
||||
og = g;
|
||||
ob = b;
|
||||
} else {
|
||||
@ -2245,6 +2246,8 @@ static void load_genlock_image(void)
|
||||
png_uint_32 width, height;
|
||||
int depth, color_type;
|
||||
struct png_cb cb;
|
||||
png_bytepp row_pp;
|
||||
png_size_t cols;
|
||||
|
||||
xfree(genlock_image);
|
||||
genlock_image = NULL;
|
||||
@ -2290,13 +2293,13 @@ static void load_genlock_image(void)
|
||||
if (!(color_type & PNG_COLOR_MASK_ALPHA))
|
||||
png_set_add_alpha(png_ptr, 0, PNG_FILLER_AFTER);
|
||||
|
||||
png_size_t cols = png_get_rowbytes(png_ptr, info_ptr);
|
||||
cols = png_get_rowbytes(png_ptr, info_ptr);
|
||||
|
||||
genlock_image_pitch = width * 4;
|
||||
genlock_image_width = width;
|
||||
genlock_image_height = height;
|
||||
|
||||
png_bytepp row_pp = new png_bytep[height];
|
||||
row_pp = new png_bytep[height];
|
||||
|
||||
genlock_image = xcalloc(uae_u8, width * height * 4);
|
||||
|
||||
|
||||
@ -360,8 +360,6 @@ static int native_dos_op (uae_u32 mode, uae_u32 p1, uae_u32 p2, uae_u32 p3)
|
||||
return 0;
|
||||
}
|
||||
|
||||
extern uae_u32 picasso_demux (uae_u32 arg, TrapContext *context);
|
||||
|
||||
static uae_u32 REGPARAM2 uaelib_demux2 (TrapContext *context)
|
||||
{
|
||||
#define ARG0 (get_long (m68k_areg (regs, 7) + 4))
|
||||
|
||||
@ -29,5 +29,5 @@ void write_log_standard (const char *fmt, ...)
|
||||
fprintf (stderr, fmt, x1, x2, x3, x4, x5, x6, x7, x8);
|
||||
}
|
||||
#endif
|
||||
va_end (ap);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user