Reset the screen

General Programming help in C, C++ or ASM, Compiling / Debugging, and R3000A Central Processing Unit (CPU) information
Post Reply
User avatar
New Nova
Active PSXDEV User
Active PSXDEV User
Posts: 61
Joined: Oct 27, 2018
I am a: Collector, developper, artist
Motto: RTFM
PlayStation Model: DTL-H2000
Location: France
Contact:

Reset the screen

Post by New Nova » October 28th, 2018, 10:15 pm

Hi there.
I'm learning about making some PS1 programs, and I want to know how to reset the screen to display something else.
Let me explain.
I have a little program who display "HELLO WORLD" by pressing X. It also display "PRESS X TO HELLO" constantly.
So when I press X :
"PRESS X TO HELLO
HELLO WORLD"

BUT I want to make the first line disappearing and the "HELLO WORLD" one displaying at the first line.
I attempt "ResetGraph(0)" and reinitialize everything to reprint, but it didn't work (just a black screen).

Can you help me out ?

Thanks :)
Development PC : Compaq PC, Intel Pentium III 600MHz, 256MB RAM, NVIDIA GeForce4 MX 440 (AGP)
Development Unit : DTL-H2000 board + DTL-H2010 CD-ROM drive
Retail Unit : SCPH-1002 + XplorerFX + caetla + modchip + activity LED mod

User avatar
Shadow
Verified
Admin / PSXDEV
Admin / PSXDEV
Posts: 2670
Joined: Dec 31, 2012
PlayStation Model: H2000/5502
Discord: Shadow^PSXDEV

Post by Shadow » October 31st, 2018, 8:05 pm

Easy. Make a variable and toggle between it when you press the X button. You don't need to reset the GPU each time either. That's silly. Just use an else statement with the FntPrint line or use a switch/case for multiple lines.
Development Console: SCPH-5502 with 8MB RAM, MM3 Modchip, PAL 60 Colour Modification (for NTSC), PSIO Switch Board, DB-9 breakout headers for both RGB and Serial output and an Xplorer with CAETLA 0.34.

PlayStation Development PC: Windows 98 SE, Pentium 3 at 400MHz, 128MB SDRAM, DTL-H2000, DTL-H2010, DTL-H201A, DTL-S2020 (with 4GB SCSI-2 HDD), 21" Sony G420, CD-R burner, 3.25" and 5.25" Floppy Diskette Drives, ZIP 100 Diskette Drive and an IBM Model M keyboard.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 6 guests