mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-08 16:38:05 -04:00
Pico version reg, irq3 handling changed
git-svn-id: file:///home/notaz/opt/svn/PicoDrive@443 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
parent
d49b10c2f2
commit
1e6b5e39f4
6 changed files with 67 additions and 34 deletions
|
@ -9,23 +9,32 @@ static int prev_line_cnt_irq3 = 0, prev_line_cnt_irq5 = 0;
|
|||
|
||||
static void PicoLineHookPico(int count)
|
||||
{
|
||||
|
||||
PicoPicohw.line_counter += count;
|
||||
if ((PicoPicohw.line_counter & 0xf) == 0 || count > 10)
|
||||
{
|
||||
if (PicoPicohw.fifo_bytes > 0)
|
||||
PicoPicohw.fifo_bytes--;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (PicoPicohw.line_counter - prev_line_cnt_irq3 > 200) {
|
||||
#if 1
|
||||
if ((PicoPicohw.r12 & 0x4003) && PicoPicohw.line_counter - prev_line_cnt_irq3 > 200) {
|
||||
prev_line_cnt_irq3 = PicoPicohw.line_counter;
|
||||
// just a guess/hack, allows 101 Dalmantians to boot
|
||||
elprintf(EL_ANOMALY, "irq3");
|
||||
SekInterrupt(3);
|
||||
return;
|
||||
}
|
||||
|
||||
if (PicoPicohw.fifo_bytes == 16) {
|
||||
prev_line_cnt_irq3 = PicoPicohw.line_counter;
|
||||
elprintf(EL_ANOMALY, "irq3, fb=%i", PicoPicohw.fifo_bytes);
|
||||
SekInterrupt(3);
|
||||
PicoPicohw.fifo_bytes--;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((PicoPicohw.line_counter & 3) == 0 || count > 10)
|
||||
{
|
||||
if (PicoPicohw.fifo_bytes > 0)
|
||||
PicoPicohw.fifo_bytes--;
|
||||
}
|
||||
|
||||
#if 0
|
||||
if (PicoPicohw.line_counter - prev_line_cnt_irq5 > 512) {
|
||||
prev_line_cnt_irq5 = PicoPicohw.line_counter;
|
||||
|
@ -46,6 +55,16 @@ PICO_INTERNAL int PicoInitPico(void)
|
|||
PicoPicohw.pen_pos[1] = 0x200 + 252/2;
|
||||
prev_line_cnt_irq3 = 0, prev_line_cnt_irq5 = 0;
|
||||
|
||||
// map version register
|
||||
PicoDetectRegion();
|
||||
elprintf(EL_STATUS, "a %x", Pico.m.hardware);
|
||||
switch (Pico.m.hardware >> 6) {
|
||||
case 0: PicoPicohw.r1 = 0x00; break;
|
||||
case 1: PicoPicohw.r1 = 0x00; break;
|
||||
case 2: PicoPicohw.r1 = 0x40; break;
|
||||
case 3: PicoPicohw.r1 = 0x20; break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue