mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
ec4306fbb3
Framework work on codex/mmx6-support that makes Tomba build and play (title screen, 0 dispatch misses) and MMX6 boot through BIOS to its intro. Touches recompiler codegen (code_generator, function_analysis) and runtime CD-ROM/DMA/MDEC/GPU/SIO timing (cdrom, dma, mdec, gpu, psx_cycles, traps, fntrace, debug_server) + headers + runtime.cmake. Milestone snapshot for collapsing onto master. Build dir excluded. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
36 lines
1.0 KiB
C
36 lines
1.0 KiB
C
#ifndef PSXRECOMP_TIMERS_H
|
|
#define PSXRECOMP_TIMERS_H
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define TIMER_BASE 0x1F801100
|
|
|
|
void timers_init(void);
|
|
void timers_get_snapshot(uint16_t counter[3], uint32_t mode[3],
|
|
uint16_t target[3], int32_t irq_line[3],
|
|
uint32_t frac[3]);
|
|
void timers_set_snapshot(const uint16_t counter[3], const uint32_t mode[3],
|
|
const uint16_t target[3], const int32_t irq_line[3],
|
|
const uint32_t frac[3]);
|
|
|
|
/* MMIO read/write for 0x1F801100..0x1F80112F.
|
|
* Accepts 16-bit or 32-bit access (caller zero-extends). */
|
|
uint32_t timers_read(uint32_t addr);
|
|
void timers_write(uint32_t addr, uint32_t value);
|
|
|
|
/* Advance all timers by guest CPU cycles. Used by native block-cycle builds. */
|
|
void timers_advance(uint32_t cycles);
|
|
|
|
/* Legacy coarse tick used by interpreter/oracle builds. */
|
|
void timers_tick(int cycles);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* PSXRECOMP_TIMERS_H */
|