Add read and write PTIMER registers. Doesn't actually do anything as a timer yet. Fix software and hardware interrupts being the wrong way around

This commit is contained in:
starfrost013
2024-12-09 11:57:54 +00:00
parent 2bb1175bc8
commit 4c2477a4cf
5 changed files with 59 additions and 5 deletions

View File

@@ -290,8 +290,12 @@ typedef struct nv3_pextdev_s
typedef struct nv3_ptimer_s
{
uint32_t interrupt_status; // Interrupt status
uint32_t interrupt_enable; // Interrupt enable
uint32_t interrupt_status; // PTIMER Interrupt status
uint32_t interrupt_enable; // PTIMER Interrupt enable
uint32_t clock_numerator; // PTIMER (tick?) numerator
uint32_t clock_denominator; // PTIMER (tick?) denominator
uint64_t time; // time
uint32_t alarm; // The value of time when there should be an alarm
} nv3_ptimer_t;
// Graphics object hashtable

View File

@@ -194,6 +194,11 @@ extern const device_config_t nv3_config[];
#define NV3_PTIMER_START 0x9000 // Programmable Interval Timer
#define NV3_PTIMER_INTR 0x9100
#define NV3_PTIMER_INTR_EN 0x9140
#define NV3_PTIMER_NUMERATOR 0x9200
#define NV3_PTIMER_DENOMINATOR 0x9210
#define NV3_PTIMER_TIME_0_NSEC 0x9400 // nanoseconds [31:5]
#define NV3_PTIMER_TIME_1_NSEC 0x9410 // nanoseconds [28:0]
#define NV3_PTIMER_ALARM_NSEC 0x9420 // nanoseconds [31:5]
#define NV3_PTIMER_END 0x9FFF
#define NV3_VGA_VRAM_START 0xA0000 // VGA Emulation VRAM
#define NV3_VGA_VRAM_END 0xBFFFF