camera: revise interface behavior to be more accurate

* there are two FIFO buffers (finally fixes Let's Golf)
* fix issues with camera start condition/cnt bit15
* add camera interface state to savestate
This commit is contained in:
Arisotura
2025-07-07 14:48:53 +02:00
parent 85d9202633
commit 7499958ad0
4 changed files with 112 additions and 53 deletions

View File

@ -118,15 +118,25 @@ private:
u32 CropStart, CropEnd;
// pixel data buffer holds a maximum of 512 words, regardless of how long scanlines are
u32 DataBuffer[512];
u32 BufferReadPos, BufferWritePos;
bool Transferring;
// pixel data buffers hold a maximum of 512 words, regardless of how long scanlines are
typedef struct
{
u32 Data[512];
u32 ReadPos, WritePos;
} sPixelBuffer;
sPixelBuffer PixelBuffer[2];
u8 CurPixelBuffer;
u32 BufferNumLines;
DSi_Camera* CurCamera;
static const u32 kIRQInterval;
static const u32 kScanlineTime;
static const u32 kTransferStart;
void SwapPixelBuffers();
};
}