/* * 240p Test Suite * Copyright (C)2014-2022 Artemio Urbina (PC Engine/TurboGrafx-16) * * This file is part of the 240p Test Suite * * The 240p Test Suite is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * The 240p Test Suite is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with 240p Test Suite; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "huc.h" int xres_flags; unsigned char Enabled240p; unsigned char UseDefault; unsigned char EnabledSoft; unsigned char Enabled_C_BW; int controller; int read; unsigned char redraw; unsigned char refresh; int row; int x; int x1; int x2; int x3; int x4; int x5; int y; int y2; int i; int sel; int option; unsigned char end; int speed; int color; int clicks[10]; unsigned char text; unsigned char variation; unsigned char change; unsigned char audio; unsigned char view; int vary; unsigned char draw; int top; int bottom; int left; int right; unsigned char previous; unsigned char screen; int hres; unsigned char back; int colswap; unsigned char *mem; int runmdf; #ifdef SYSCARD1 #include "graphics.h" #endif void ResetVideo() { vsync(); disp_off(); cls(); for(i = 0; i < 511; i++) set_color(i, 0); init_satb(); satb_update(); #ifndef HELP_OVL ResetScroll(); Set320H(); #endif set_screen_size(SCR_SIZE_64x32); } void disp_sync_on() { vsync(); disp_on(); } #ifndef HELP_OVL void ResetScroll() { scroll(0, 0, 0, 0, 240, 0xC0); scroll(1, 0, 0, 0, 240, 0xC0); scroll(2, 0, 0, 0, 240, 0xC0); scroll(3, 0, 0, 0, 240, 0xC0); } void Center224in240() { if(!Enabled240p) scroll(0, 0, 8, 0, 240, 0xC0); } void Set224p() { Enabled240p = 0; //VSR/VPR 17 02 //VDR/VDW 00 DF //VCR 00 0A #asm lda #$20 ; reset resource-usage flag tsb 0B03 //HDR 083F #asm lda _xres_flags sta <__cl lda #$20 ; reset resource-usage flag tsb