kopia lustrzana https://github.com/Jean-MarcHarvengt/MCUME
UAE minor fixes
rodzic
f36cb5dc61
commit
53115a9e26
|
@ -29,7 +29,7 @@
|
|||
#include "autoconf.h"
|
||||
|
||||
#define OS_WITHOUT_MEMORY_MANAGEMENT
|
||||
#define LORES_HACK
|
||||
//#define LORES_HACK
|
||||
//#define SMART_UPDATE 1
|
||||
|
||||
#define SPRITE_COLLISIONS
|
||||
|
@ -45,7 +45,7 @@
|
|||
* @@@ Probably won't compile in this version.
|
||||
*/
|
||||
|
||||
/* #define EMULATE_AGA */
|
||||
//#define EMULATE_AGA
|
||||
|
||||
#ifndef EMULATE_AGA
|
||||
#define AGA_CHIPSET 0
|
||||
|
|
|
@ -679,20 +679,22 @@ int emu_setKeymap(int index) {
|
|||
tft.drawText(0,64+16, "--- --- --- --- --- --- --- --- --- --- ", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0xff), false);
|
||||
tft.drawText(0,72+16, " z I x I c I v I b I n I m I , IDELISPCI", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0x80), true);
|
||||
tft.drawText(0,88+16, "--- --- --- --- --- --- --- --- --- --- ", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0x80), false);
|
||||
delay(500);
|
||||
tft.drawText(0,96+16,"mouse mode ", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0x00), false);
|
||||
delay(200);
|
||||
}
|
||||
else if (keyMap == 0) {
|
||||
keyMap = 1;
|
||||
keys = key_map2;
|
||||
tft.drawText(0, 0+16, "F1 IF2 IF3 IF4 IF5 IF6 IF7 IF8 IF9 IF10I", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0xff), true);
|
||||
tft.drawText(0,16+16, "--- --- --- --- --- --- --- --- --- --- ", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0xff), false);
|
||||
tft.drawText(0,24+16, " q I w I e I r I t I y I u I i I o I p I", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0x80), true);
|
||||
tft.drawText(0,24+16, "PRNIDELIDELI r I t I y I u I i I o I p I", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0x80), true);
|
||||
tft.drawText(0,40+16, "--- --- --- --- --- --- --- --- --- --- ", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0x80), false);
|
||||
tft.drawText(0,48+16, " a I s I d I f I g I h I j I k I l IRTNI", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0xff), true);
|
||||
tft.drawText(0,64+16, "--- --- --- --- --- --- --- --- --- --- ", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0xff), false);
|
||||
tft.drawText(0,72+16, " z I x I c I v I b I n I m I , IDELISPCI", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0x80), true);
|
||||
tft.drawText(0,88+16, "--- --- --- --- --- --- --- --- --- --- ", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0x80), false);
|
||||
delay(500);
|
||||
tft.drawText(0,96+16,"joystick mode ", RGBVAL16(0x00,0xff,0xff), RGBVAL16(0x00,0x00,0x00), false);
|
||||
delay(200);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -69,7 +69,7 @@ const unsigned short key_map1[]={
|
|||
const unsigned short key_map2[]={
|
||||
|
||||
41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
|
||||
11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
|
||||
51, 52, 53, 14, 15, 16, 17, 18, 19, 20,
|
||||
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40 };
|
||||
|
||||
|
|
|
@ -77,11 +77,6 @@ extern void machdep_init (void);
|
|||
|
||||
extern char romfile[], prtname[], sername[];
|
||||
|
||||
#define MAX_COLOR_MODES 5
|
||||
|
||||
extern int fast_memcmp(const void *foo, const void *bar, int len);
|
||||
extern int memcmpy(void *foo, const void *bar, int len);
|
||||
|
||||
/*
|
||||
* You can specify numbers from 0 to 5 here. It is possible that higher
|
||||
* numbers will make the CPU emulation slightly faster, but if the setting
|
||||
|
@ -90,12 +85,6 @@ extern int memcmpy(void *foo, const void *bar, int len);
|
|||
*/
|
||||
#define CPU_EMU_SIZE 0
|
||||
|
||||
/* #define NEED_TO_DEBUG_BADLY */
|
||||
|
||||
#if !defined(USER_PROGRAMS_BEHAVE)
|
||||
#define USER_PROGRAMS_BEHAVE 0
|
||||
#endif
|
||||
|
||||
/* Some memsets which know that they can safely overwrite some more memory
|
||||
* at both ends and use that knowledge to align the pointers. */
|
||||
|
||||
|
@ -165,6 +154,15 @@ static __inline__ void fuzzy_memset_le32_1 (void *p, uae_u32 c, int offset, int
|
|||
}
|
||||
}
|
||||
|
||||
static __inline__ int memcmpy(void *foo, const void *bar, int len)
|
||||
{
|
||||
int differs = memcmp(foo, bar, len);
|
||||
memcpy(foo, bar, len);
|
||||
return differs;
|
||||
}
|
||||
|
||||
#define fast_memcmp memcmp
|
||||
|
||||
/*
|
||||
* Frame rate hack. Currently only implemented for Pentium (P6?) CPUs.
|
||||
*/
|
||||
|
|
|
@ -67,8 +67,6 @@ static __inline__ char *my_strdup(const char*s)
|
|||
return x;
|
||||
}
|
||||
|
||||
#define fast_memcmp memcmp
|
||||
|
||||
|
||||
/*
|
||||
* Please note: Many things are configurable with command line parameters,
|
||||
|
|
|
@ -10,12 +10,9 @@ extern "C" {
|
|||
#include "autoconf.h"
|
||||
#include "memory.h"
|
||||
#include "custom.h"
|
||||
//#include "os.h"
|
||||
//#include "newcpu.h"
|
||||
#include "disk.h"
|
||||
#include "xwin.h"
|
||||
#include "gensound.h"
|
||||
//#include "gui.h"
|
||||
#include "events.h"
|
||||
#include "sounddep/sound.h"
|
||||
#include "keyboard.h"
|
||||
|
@ -85,8 +82,7 @@ char warning_buffer[256];
|
|||
static char slinebuf[800];
|
||||
|
||||
|
||||
|
||||
#define MOUSE_STEP 4
|
||||
#define MOUSE_STEP 3
|
||||
static int prev_hk = 0;
|
||||
static int hk = 0;
|
||||
static int prev_key = 0;
|
||||
|
@ -99,29 +95,26 @@ const int keyconv[] =
|
|||
AK_Q,AK_W,AK_E,AK_R,AK_T,AK_Y,AK_U,AK_I,AK_O,AK_P,
|
||||
AK_A,AK_S,AK_D,AK_F,AK_G,AK_H,AK_J,AK_K,AK_L,AK_ENT,
|
||||
AK_Z,AK_C,AK_C,AK_V,AK_B,AK_N,AK_M,AK_COMMA,AK_BS,AK_SPC,
|
||||
AK_F1,AK_F2,AK_F3,AK_F4,AK_F5,AK_F6,AK_F7,AK_F8,AK_F9,AK_F10,
|
||||
AK_F1,AK_F2,AK_F3,AK_F4,AK_F5,AK_F6,AK_F7,AK_F8,AK_F9,AK_F10,
|
||||
AK_NPMUL,AK_NPDEL,AK_DEL
|
||||
};
|
||||
|
||||
void uae_Input(int bClick) {
|
||||
hk = emu_ReadI2CKeyboard();
|
||||
k = emu_ReadKeys();
|
||||
|
||||
// Toggle mouse/joystick
|
||||
if (bClick & MASK_KEY_USER1) {
|
||||
// Toggle keymap + mouse/joystick
|
||||
if (bClick & MASK_KEY_USER2) {
|
||||
if (isMouse) isMouse = false;
|
||||
else isMouse = true;
|
||||
}
|
||||
|
||||
// Toggle keymap
|
||||
if (bClick & MASK_KEY_USER2) {
|
||||
if (isMouse) {
|
||||
emu_setKeymap(0);
|
||||
}
|
||||
else {
|
||||
disk_swap(df0,df1);
|
||||
}
|
||||
emu_setKeymap(0);
|
||||
}
|
||||
|
||||
// Diskswap in joystick mode
|
||||
if (bClick & MASK_KEY_USER1) {
|
||||
if (!isMouse) disk_swap(df0,df1);
|
||||
}
|
||||
|
||||
if (hk != prev_hk) {
|
||||
prev_hk = hk;
|
||||
if ( (hk != 0) && (hk != prev_key) ) {
|
||||
|
@ -163,7 +156,9 @@ void uae_Input(int bClick) {
|
|||
}
|
||||
|
||||
buttonstate[0] = 0;
|
||||
buttonstate[2] = 0;
|
||||
if (k & MASK_JOY2_BTN) buttonstate[0] = 1;
|
||||
if (k & MASK_KEY_USER1) buttonstate[2] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -198,9 +193,7 @@ void read_joystick(int nr, unsigned int *dir, int *button)
|
|||
if (k & MASK_JOY2_LEFT) left=1;
|
||||
if (k & MASK_JOY2_RIGHT) right=1;
|
||||
if (k & MASK_JOY2_BTN) *button |=0xFF;
|
||||
//buttonstate[0] = 0;
|
||||
//if (k & MASK_KEY_USER2) buttonstate[0] = 1;
|
||||
|
||||
|
||||
if (left) top = !top;
|
||||
if (right) bot = !bot;
|
||||
*dir = bot | (right << 1) | (top << 8) | (left << 9);
|
||||
|
@ -240,8 +233,6 @@ void flush_screen(int ystart,int ystop)
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef HAS_PSRAM
|
||||
#include "psram_t.h"
|
||||
|
||||
|
@ -313,8 +304,6 @@ void uae_Init(void)
|
|||
xcolors[i] = RGBVAL16(r<<4,g<<4,b<<4);
|
||||
}
|
||||
|
||||
|
||||
|
||||
quit_program = 2;
|
||||
|
||||
#ifdef HAS_HARDFILE
|
||||
|
@ -413,9 +402,7 @@ void uae_Start(char * floppy1, char * floppy2)
|
|||
strcpy(df0,floppy1);
|
||||
strcpy(df1,floppy2);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
emu_printf("Start done");
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue