121 const Color &color)
override;
275 void SetGsReg(
int nReg,
unsigned long long qwValue,
unsigned long long qwMask);
338 mBlurActive = nBlurActive;
348 mBlurAmount = fBlurAmount;
358 mBlurCount = nBlurCount;
378 mBlurRect[nIndex] = fValue;
392 void *mScratchpadCopy;
413 int mScreenDumpCount;
415 std::list<MemHandle *> mFrameHandles;
The display and draw environments of a double-buffered framebuffer.
Definition gsdoublebuffer.h:21
Movable block of a handle heap, reached through a handle the block points back to.
Definition memhandle.h:21
The PlayStation 2 renderer.
Definition ps.h:21
void ReleaseAfterFrame(MemHandle *pHandle)
Release a memory handle at the next buffer swap, once the GS no longer reads it.
void SaveScratchpad()
Copy the scratchpad to a new block in main memory, releasing an earlier copy.
void Terminate() override
Restore the generic factories, stop the vertical blank handler, and release the MFIFO ring.
virtual ~Ps()
Release the frame's pending memory handles list.
void Flush()
Send the packet being built and start the next one in the other half of the scratchpad.
void RestoreAfterMovie()
Set the display up, the first time from Init() and again after the movie player.
float * GetBlurRect()
Definition ps.h:367
int GetNtsc() const
Definition ps.h:387
void RestoreScratchpad()
Copy the block SaveScratchpad() made back to the scratchpad and release it.
void SetClearColor(const Color &color) override
Set the colour the frame is cleared to and write it into the clears of both buffers.
void DumpStats() override
Pass the drawing statistics and the free GS memory to DebugPrint().
bool SupportsTextures() override
Report that the renderer reads texture files.
Definition ps.h:176
void SetBlurRect(int nIndex, float fValue)
Set one entry of the part of the screen DrawBlur() covers, x, y, w, and h.
Definition ps.h:377
int GetBlurActive() const
Definition ps.h:332
void ClearAndFlip() override
Clear the buffer being drawn and show it outside a frame.
const float * GetBlurRect() const
Definition ps.h:362
static constexpr int kGsRegCount
The number of GS registers mGsRegs shadows.
Definition ps.h:24
Ps()
Construct a renderer with a full-screen blur rectangle and register the toggle_heapnum command.
float GetBlurAmount() const
Definition ps.h:342
void ReleaseForMovie()
Give the display up to the movie player.
void DrawRect(const Rect &rect, const Color &color) override
Fill a rectangle of the screen, blended and in front of everything.
int GetReservedVramWords() const
Report the GS memory the frame buffers and the depth buffer occupy.
static constexpr float kAspect
The ratio AspectRatio() reports.
Definition ps.h:181
void SwapBuffers()
Release the memory handles of the frame, wait for the vertical blank, and swap the buffers.
int GetDepthBytes() const
Definition ps.h:382
void ScreenDump(const char *pszName) override
Save the buffer on display to a numbered BMP file.
float DrawString(const char *pszText, const Vector2 &pos, const Vector2 &charSize, const Color &color) override
Draw text with the line font.
void SetGsReg(int nReg, unsigned long long qwValue, unsigned long long qwMask)
Write a GS register through an A+D tag unless its shadow already has the value.
void DrawBlur()
Draw the frame back over itself, offset and translucent, inside mBlurRect.
float AspectRatio() override
Report the ratio of the height of the display to its width, fixed at 3 to 4.
Definition ps.h:165
void Init() override
Read the configuration, round the display to a size the GS shows, and set the display up.
void BeginFrame() override
Swap the buffers, restart the MFIFO drain, and set the frame up.
int PacketQwordsFree() const
Report how many quadwords the packet being built still has room for.
void SetBlurCount(int nBlurCount)
Definition ps.h:357
void ShowModal(int *pState, const char *pszText)
Show a message on a dark blue screen until the player presses a button.
int GetBlurCount() const
Definition ps.h:352
void EndFrame() override
Draw the blur when it is active, end the packet, and send it.
void SetBlurAmount(float fBlurAmount)
Definition ps.h:347
static void ModalCallback(int *pState, const char *pszText)
Show a message through ThePs, the routine Init() gives TheDebug.
void RestoreFrameBufferTarget() override
Point FRAME_1 and XYOFFSET_1 at the buffer being drawn, and dither a 16-bit display.
void SetBlurActive(int nBlurActive)
Definition ps.h:337
RndRenderer()
Set an opaque grey of 0.3, a display of 640 by 480 at 16 bits, and a timer ceiling of 50.
DmaQuadword g_vu1MicrocodeChain[]
The DMA chain that loads the VU1 microprograms and resets the VIF1 double buffer, ending with an END ...
volatile int gVCount
The vertical blanks counted since start-up.
DmaQuadword g_vu0MicrocodeChain[]
The DMA chain that loads the VU0 microprograms, ending with an END tag.
Linear colour with four float components.
Definition color.h:12
One quadword of a DMA packet, viewed as doublewords, words, or halfwords.
Definition dmapacket.h:4
Axis-aligned rectangle given by a corner and a size.
Definition rect.h:11
Two-component vector, used for texture coordinates.
Definition vector2.h:12