Skip to content

Commit

Permalink
displayed lines can now go to 286, useful for overscan in Babeanoid
Browse files Browse the repository at this point in the history
  • Loading branch information
rsn8887 committed Jul 2, 2019
1 parent b842e2a commit 382f23e
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 33 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@ if(BUILD_PSP2)
COMMAND cp ${PROJECT_NAME}.self vpk/eboot.bin
COMMAND cp -r ${CMAKE_SOURCE_DIR}/psp2data/* vpk
COMMAND cd vpk && zip -r ../uae4all_${VERSION_MAJOR}.${VERSION_MINOR}.vpk . && cd ..
COMMAND zip -d ${CMAKE_BINARY_DIR}/uae4all_${VERSION_MAJOR}.${VERSION_MINOR}.vpk *.DS_Store || true
COMMAND zip -d ${CMAKE_BINARY_DIR}/uae4all_${VERSION_MAJOR}.${VERSION_MINOR}.vpk *__MAC* || true
)
endif(BUILD_PSP2)

Expand Down Expand Up @@ -303,6 +305,8 @@ if(BUILD_NX)
COMMAND cp -f ${CMAKE_BINARY_DIR}/${PROJECT_NAME}.nro ${CMAKE_BINARY_DIR}/release/${PROJECT_NAME}/${PROJECT_NAME}.nro
COMMAND cp -r ${CMAKE_SOURCE_DIR}/switchdata/data/* ${CMAKE_BINARY_DIR}/release/${PROJECT_NAME}/data/
COMMAND cd ${CMAKE_BINARY_DIR}/release && zip -r ../${PROJECT_NAME}_${VERSION_MAJOR}.${VERSION_MINOR}_switch.zip ${PROJECT_NAME} && cd ${CMAKE_BINARY_DIR}
COMMAND zip -d ${CMAKE_BINARY_DIR}/${PROJECT_NAME}_${VERSION_MAJOR}.${VERSION_MINOR}_switch.zip *.DS_Store || true
COMMAND zip -d ${CMAKE_BINARY_DIR}/${PROJECT_NAME}_${VERSION_MAJOR}.${VERSION_MINOR}_switch.zip *__MAC* || true
)
endif(BUILD_NX)

Expand Down
14 changes: 7 additions & 7 deletions src/drawing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
//#if defined(__PSP2__) || defined(__SWITCH__)
//#define GFXVIDINFO_HEIGHT 240
//#else
#define GFXVIDINFO_HEIGHT 270
#define GFXVIDINFO_HEIGHT 286
//#endif
#define MAXBLOCKLINES 270
#define MAXBLOCKLINES 286
//#define VISIBLE_LEFT_BORDER 72
//#define VISIBLE_RIGHT_BORDER 392
//#define LINETOSCR_X_ADJUST_BYTES 144
Expand Down Expand Up @@ -168,7 +168,7 @@ static int min_diwstart, max_diwstop;
static int thisframe_y_adjust;
static int thisframe_y_adjust_real, max_ypos_thisframe, min_ypos_for_screen;
static int extra_y_adjust;
int moveX = 0, moveY = 0;
int moveX = 0, moveY = 16;

/* A frame counter that forces a redraw after at least one skipped frame in
interlace mode. */
Expand Down Expand Up @@ -2384,8 +2384,8 @@ void drawing_init ()
void moveVertical(int value)
{
moveY += value;
if(moveY<-42)
moveY=-42;
else if(moveY>50)
moveY=50;
if(moveY<-26)
moveY=-26;
else if(moveY>66)
moveY=66;
}
5 changes: 3 additions & 2 deletions src/gp2x/menu/menu_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ void SetDefaultMenuSettings(int general)
#endif //__PSP2__
SetPresetMode(2);
moveX = 0;
moveY = 0;
moveY = 16;
mainMenu_cutLeft = 0;
mainMenu_cutRight = 0;
mainMenu_ntsc = DEFAULT_NTSC;
Expand Down Expand Up @@ -1217,7 +1217,7 @@ int saveconfig(int general)
fputs(buffer,f);
snprintf((char*)buffer, 255, "moveX=%d\n",moveX);
fputs(buffer,f);
snprintf((char*)buffer, 255, "moveY=%d\n",moveY);
snprintf((char*)buffer, 255, "moveY=%d\n",moveY-16); // compatibility with versions <1.96
fputs(buffer,f);
snprintf((char*)buffer, 255, "displayedLines=%d\n",mainMenu_displayedLines);
fputs(buffer,f);
Expand Down Expand Up @@ -1628,6 +1628,7 @@ void loadconfig(int general)
fscanf(f,"presetModeId=%d\n",&presetModeId);
fscanf(f,"moveX=%d\n",&moveX);
fscanf(f,"moveY=%d\n",&moveY);
moveY+=16; // compatibility with versions <1.96
fscanf(f,"displayedLines=%d\n",&mainMenu_displayedLines);
fscanf(f,"screenWidth=%d\n",&screenWidth);
fscanf(f,"cutLeft=%d\n",&mainMenu_cutLeft);
Expand Down
6 changes: 3 additions & 3 deletions src/gp2x/menu/menu_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ static int key_displayMenu(int *c)
}
else if (right)
{
if (mainMenu_displayedLines<270)
if (mainMenu_displayedLines<286)
mainMenu_displayedLines++;
}
break;
Expand All @@ -716,12 +716,12 @@ static int key_displayMenu(int *c)
case MENUDISPLAY_VERTPOS:
if (left)
{
if (moveY>-42)
if (moveY>-26)
moveY--;
}
else if (right)
{
if (moveY<50)
if (moveY<66)
moveY++;
}
break;
Expand Down
11 changes: 10 additions & 1 deletion src/gp2x/menu/menu_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,8 @@ void update_display() {

#if defined(__PSP2__) || defined(__SWITCH__)
if (prSDLScreen != NULL) {
for (int i=0; i<10; i++)
// clear old screen
for (int i=0; i<4; i++)
{
SDL_FillRect(prSDLScreen,NULL,SDL_MapRGB(prSDLScreen->format, 0, 0, 0));
SDL_Flip(prSDLScreen);
Expand Down Expand Up @@ -281,6 +282,14 @@ void update_display() {
}
shader = new PSP2Shader((PSP2Shader::Shader)mainMenu_shader);
#endif

// clear new screen
for (int i=0; i<4; i++)
{
SDL_FillRect(prSDLScreen,NULL,SDL_MapRGB(prSDLScreen->format, 0, 0, 0));
SDL_Flip(prSDLScreen);
}

#else
#if defined(PANDORA) && !(defined(WIN32) || defined(AROS))
prSDLScreen = SDL_SetVideoMode(visibleAreaWidth, mainMenu_displayedLines, 16, SDL_SWSURFACE|SDL_FULLSCREEN|SDL_DOUBLEBUF);
Expand Down
31 changes: 16 additions & 15 deletions src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,20 +122,21 @@ struct myRes
int top_pos;
};
static myRes quickSwitchModes[] = {
{192, 2},
{200, 2},
{216, 2},
{224, 2},
{240, 2},
{256, 2},
{270, 2},
{192, 14},
{200, 14},
{216, 14},
{224, 14},
{240, 14},
{256, 14},
{270, 14},
{192, 18},
{200, 18},
{216, 18},
{224, 18},
{240, 18},
{256, 18},
{270, 18},
{286, 0},
{192, 30},
{200, 30},
{216, 30},
{224, 30},
{240, 30},
{256, 30},
{270, 30},
};
extern int moveY;

Expand Down Expand Up @@ -1214,7 +1215,7 @@ if(!vkbd_mode)
//0
else if(keystate[SDLK_0])
{
if(mainMenu_displayedLines < 270)
if(mainMenu_displayedLines < 286)
mainMenu_displayedLines++;
update_display();
}
Expand Down
8 changes: 4 additions & 4 deletions src/include/custom.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ extern uae_u16 INTREQR (void);
#define MAXHPOS_NTSC MAXHPOS
#define MAXVPOS_PAL 312
#define MAXVPOS_NTSC 262
#define MINFIRSTLINE_PAL 42
#define MINFIRSTLINE_NTSC 34
#define VBLANK_ENDLINE_PAL 32
#define VBLANK_ENDLINE_NTSC 24
#define MINFIRSTLINE_PAL 26
#define MINFIRSTLINE_NTSC 21
#define VBLANK_ENDLINE_PAL 5
#define VBLANK_ENDLINE_NTSC 6
#define VBLANK_HZ_PAL 50
#define VBLANK_HZ_NTSC 60

Expand Down
2 changes: 1 addition & 1 deletion src/include/drawing.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define RES_HIRES 1
#define RES_SUPERHIRES 2

#define gfxHeight 270
#define gfxHeight 286

#ifndef UAE4ALL_ALIGN
#error UAE4ALL_ALIGN NO DEFINIDO
Expand Down

0 comments on commit 382f23e

Please sign in to comment.