/*
- * (C) notaz, 2010
+ * (C) notaz, 2010-2011
*
* This work is licensed under the terms of the GNU GPLv2 or later.
* See the COPYING file in the top-level directory.
if (OpenPlugins() == -1) {
return 1;
}
+ plugin_call_rearmed_cbs();
CheckCdrom();
SysReset();
void OnFile_Exit() {
printf("OnFile_Exit\n");
+ menu_finish();
plat_finish();
SysClose();
exit(0);
/*
- * (C) Gražvydas "notaz" Ignotas, 2010
+ * (C) Gražvydas "notaz" Ignotas, 2010-2011
*
* This work is licensed under the terms of any of these licenses
* (at your option):
#include "menu.h"
#include "config.h"
+#include "plugin.h"
#include "plugin_lib.h"
#include "omap.h"
#include "common/plat.h"
extern int ready_to_go;
static int last_psx_w, last_psx_h, last_psx_bpp;
-static int scaling, filter, state_slot, cpu_clock;
+static int scaling, filter, state_slot, cpu_clock, cpu_clock_st;
static char rom_fname_reload[MAXPATHLEN];
static char last_selected_fname[MAXPATHLEN];
int g_opts;
char buff[64], *p;
DIR *dir;
- cpu_clock = get_cpu_clock();
+ cpu_clock_st = cpu_clock = get_cpu_clock();
dir = opendir("/etc/pandora/conf/dss_fir");
if (dir == NULL) {
pnd_filter_list = mfilters;
}
+void menu_finish(void)
+{
+ cpu_clock = cpu_clock_st;
+ apply_cpu_clock();
+}
+
// -------------- key config --------------
me_bind_action me_ctrl_actions[] =
scaling = SCALE_CUSTOM;
omap_enable_layer(1);
- //pnd_restore_layer_data();
for (;;)
{
menu_draw_begin(0);
- memset(g_menuscreen_ptr, 0, g_menuscreen_w * g_menuscreen_h * 2);
- text_out16(2, 480 - 18, "%dx%d | d-pad to resize, R+d-pad to move", g_layer_w, g_layer_h);
+ memset(g_menuscreen_ptr, 4, g_menuscreen_w * g_menuscreen_h * 2);
+ text_out16(2, 2, "%d,%d", g_layer_x, g_layer_y);
+ text_out16(2, 480 - 18, "%dx%d | d-pad: resize, R+d-pad: move", g_layer_w, g_layer_h);
menu_draw_end();
inp = in_menu_wait(PBTN_UP|PBTN_DOWN|PBTN_LEFT|PBTN_RIGHT|PBTN_R|PBTN_MOK|PBTN_MBACK, 40);
" and the P.E.Op.S. team\n"
"ARM recompiler (C) 2009-2010 Ari64\n\n"
"integration, optimization and\n"
- " frontend (C) 2010 notaz\n";
+ " frontend (C) 2010-2011 notaz\n";
}
static int run_cd_image(const char *fname)
me_update_msg("failed to open plugins");
return -1;
}
+ plugin_call_rearmed_cbs();
if (CheckCdrom() == -1) {
// Only check the CD if we are starting the console with a CD
void menu_init(void);
void menu_prepare_emu(void);
void menu_loop(void);
+void menu_finish(void);
void menu_notify_mode_change(int w, int h, int bpp);
#include "plugin_lib.h"
#include "plugin.h"
#include "../libpcsxcore/psemu_plugin_defs.h"
+#include "../libpcsxcore/system.h"
#include "../plugins/cdrcimg/cdrcimg.h"
static int dummy_func() {
return 0;
}
-static long CDRreadTrack(unsigned char *time) {
- fprintf(stderr, "CDRreadTrack\n");
- return -1;
-}
-
/* SPU */
extern long SPUopen(void);
extern long SPUinit(void);
DUMMY_CDR(CDRsetfilename),
DUMMY_CDR(CDRreadCDDA),
DUMMY_CDR(CDRgetTE),
- DIRECT(PLUGIN_CDR, CDRreadTrack),
/* SPU */
DIRECT_SPU(SPUconfigure),
DIRECT_SPU(SPUabout),
return NULL;
}
+void plugin_call_rearmed_cbs(void)
+{
+ extern void *hGPUDriver;
+ void (*rearmed_set_cbs)(const struct rearmed_cbs *cbs);
+
+ rearmed_set_cbs = SysLoadSym(hGPUDriver, "GPUrearmedCallbacks");
+ if (rearmed_set_cbs != NULL)
+ rearmed_set_cbs(&pl_rearmed_cbs);
+}
+
#ifdef PCNT
/* basic profile stuff */
};
void *plugin_link(enum builtint_plugins_e id, const char *sym);
+void plugin_call_rearmed_cbs(void);
pl_text_out16_(x, y, buffer);
}
+static void pl_get_layer_pos(int *x, int *y, int *w, int *h)
+{
+ *x = g_layer_x;
+ *y = g_layer_y;
+ *w = g_layer_w;
+ *h = g_layer_h;
+}
+
+const struct rearmed_cbs pl_rearmed_cbs = {
+ pl_get_layer_pos,
+};
+
void pl_fbdev_flip(void);
void pl_fbdev_close(void);
-void pl_text_out16(int x, int y, const char *texto, ...);
+void pl_text_out16(int x, int y, const char *texto, ...);
+
+struct rearmed_cbs {
+ void (*pl_get_layer_pos)(int *x, int *y, int *w, int *h);
+};
+
+extern const struct rearmed_cbs pl_rearmed_cbs;
#ifndef ARRAY_SIZE
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0]))
int iRumbleVal = 0;\r
int iRumbleTime = 0;\r
\r
+static void (*rearmed_get_layer_pos)(int *x, int *y, int *w, int *h);\r
+\r
////////////////////////////////////////////////////////////////////////\r
// stuff to make this a true PDK module\r
////////////////////////////////////////////////////////////////////////\r
iResX=240;iResY=320;\r
#endif\r
#ifdef MAEMO_CHANGES\r
- iResX=640;iResY=480;\r
+ iResX=800;iResY=480;\r
#endif\r
iColDepth=8;\r
bChangeRes=FALSE;\r
if(!PSXDisplay.DisplayModeNew.x) return;\r
if(!PSXDisplay.DisplayModeNew.y) return;\r
\r
+#if 0\r
xs=(float)iResX/(float)PSXDisplay.DisplayModeNew.x;\r
ys=(float)iResY/(float)PSXDisplay.DisplayModeNew.y;\r
\r
}\r
\r
rRatioRect=r;\r
-\r
+#else\r
+ // pcsx-rearmed hack\r
+ if (rearmed_get_layer_pos != NULL)\r
+ rearmed_get_layer_pos(&rRatioRect.left, &rRatioRect.top, &rRatioRect.right, &rRatioRect.bottom);\r
+#endif\r
\r
glViewport(rRatioRect.left,\r
iResY-(rRatioRect.top+rRatioRect.bottom),\r
{\r
// dwCoreFlags=dwFlags;\r
}\r
+\r
+// pcsx-rearmed callbacks\r
+void CALLBACK GPUrearmedCallbacks(const void **cbs)\r
+{\r
+ rearmed_get_layer_pos = cbs[0];\r
+}\r
+\r