forked from len0rd/rockbox
do not update border when we don't see it. some more cleanup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11055 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
b2111b9a91
commit
25ffd2e146
7 changed files with 71 additions and 91 deletions
|
|
@ -1,3 +1,5 @@
|
|||
26.09.2006 do not update border when we don't see it. some more cleanup.
|
||||
|
||||
25.09.2006 yet more code cleanup, quick snapshot feature,sound should no longer crash,light optimizations
|
||||
|
||||
04.09.2006 code cleanup; now using IRAM correctly (i hope)
|
||||
|
|
|
|||
|
|
@ -60,11 +60,15 @@ int SPNM(halfframe)(int firsttick, int numlines)
|
|||
/* Check if updating screen */
|
||||
|
||||
if(SPNM(updating)) {
|
||||
#if LCD_WIDTH == 320 && ( LCD_HEIGHT == 240 || LCD_HEIGHT == 200 )
|
||||
border = SPNM(lastborder);
|
||||
if((feport & 0x07) != border) {
|
||||
SPNM(border_update) = 2;
|
||||
SPNM(lastborder) = feport & 0x07;
|
||||
}
|
||||
#else
|
||||
SPNM(border_update) = 0;
|
||||
#endif
|
||||
scrptr = update_screen_line(scrptr, SPNM(coli)[scline], DANM(next_scri),
|
||||
border, &cmark);
|
||||
|
||||
|
|
|
|||
|
|
@ -480,16 +480,6 @@ static void run_singlemode(void)
|
|||
showframe = settings.frameskip+1;
|
||||
spti_reset();
|
||||
}
|
||||
if(sp_paused) {
|
||||
autoclose_sound();
|
||||
while(sp_paused) {
|
||||
spkb_process_events(1);
|
||||
spti_sleep(SKIPTICKS);
|
||||
translate_screen();
|
||||
update();
|
||||
}
|
||||
spti_reset();
|
||||
}
|
||||
halfsec = !(sp_int_ctr % 25);
|
||||
evenframe = !(sp_int_ctr & 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@ int SPNM(scri)[PORT_TIME_NUM];
|
|||
int SPNM(coli)[PORT_TIME_NUM];
|
||||
|
||||
int SPNM(playing_tape) = 0;
|
||||
int SPNM(paused) = 0;
|
||||
|
||||
char *SPNM(image);
|
||||
int SPNM(updating);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,6 @@ extern int SPNM(load_trapped);
|
|||
extern qbyte SPNM(scr_mark)[];
|
||||
extern byte SPNM(fe_inport_high)[];
|
||||
extern int SPNM(playing_tape);
|
||||
extern int SPNM(paused);
|
||||
|
||||
extern int SPNM(scline);
|
||||
|
||||
|
|
|
|||
|
|
@ -82,6 +82,7 @@ byte *update_screen_line(byte *scrp, int coli, int scri, int border,
|
|||
cmark = *cmarkp;
|
||||
scrptr = (qbyte *) scrp;
|
||||
if(scri >= 0) { /* normal line */
|
||||
#if LCD_WIDTH == 320 && ( LCD_HEIGHT == 240 || LCD_HEIGHT == 200 )
|
||||
if(SPNM(border_update)) {
|
||||
brd_color = SPNM(colors)[border];
|
||||
brd_color |= brd_color << 8;
|
||||
|
|
@ -91,7 +92,10 @@ byte *update_screen_line(byte *scrp, int coli, int scri, int border,
|
|||
for(i = 8; i; i--) *scrptr++ = brd_color;
|
||||
scrptr -= 0x48;
|
||||
}
|
||||
else scrptr += 0x08;
|
||||
else
|
||||
#endif
|
||||
scrptr += 0x08;
|
||||
|
||||
tmptr = SPNM(scr_mark) + 0x2C0 + (coli >> 3);
|
||||
mark = *tmptr;
|
||||
if(!(coli & 0x07)) {
|
||||
|
|
@ -129,40 +133,23 @@ byte *update_screen_line(byte *scrp, int coli, int scri, int border,
|
|||
else scrptr += 0x48;
|
||||
}
|
||||
else if(scri == -1) { /* only border */
|
||||
#if LCD_WIDTH == 320 && ( LCD_HEIGHT == 240 || LCD_HEIGHT == 200 )
|
||||
if(SPNM(border_update)) {
|
||||
brd_color = SPNM(colors)[border];
|
||||
brd_color |= brd_color << 8;
|
||||
brd_color |= brd_color << 16;
|
||||
for(i = 0x50; i; i--) *scrptr++ = brd_color;
|
||||
}
|
||||
else scrptr += 0x50;
|
||||
else
|
||||
#endif
|
||||
scrptr += 0x50;
|
||||
|
||||
}
|
||||
|
||||
*cmarkp = cmark;
|
||||
return (byte *) scrptr;
|
||||
}
|
||||
|
||||
void translate_screen(void)
|
||||
{
|
||||
int border, scline;
|
||||
byte *scrptr;
|
||||
qbyte cmark = 0;
|
||||
|
||||
scrptr = (byte *) SPNM(image);
|
||||
|
||||
border = DANM(ula_outport) & 0x07;
|
||||
if(border != SPNM(lastborder)) {
|
||||
SPNM(border_update) = 2;
|
||||
SPNM(lastborder) = border;
|
||||
}
|
||||
|
||||
for(scline = 0; scline < (TMNUM / 2); scline++)
|
||||
scrptr = update_screen_line(scrptr, SPNM(coli)[scline], SPNM(scri)[scline],
|
||||
border, &cmark);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void spscr_init_mask_color(void)
|
||||
{
|
||||
int clb;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,6 @@ extern void init_spect_scr(void);
|
|||
extern void destroy_spect_scr(void);
|
||||
extern void update_screen(void);
|
||||
extern void flash_change(void);
|
||||
extern void translate_screen(void);
|
||||
|
||||
extern byte *update_screen_line(byte *scrp, int coli, int scri, int border,
|
||||
qbyte *cmarkp);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue