Aleste 2 ROM

Page 11/18
4 | 5 | 6 | 7 | 8 | 9 | 10 | | 12 | 13 | 14 | 15 | 16

By Louthrax

Prophet (2093)

Louthrax's picture

19-07-2016, 21:27

Quote:

Could be you Louthrax.. Wink

!!! I prefer to imagine a real girl behind that voice... not myself oO Your original proposal just looks perfect Smile

By ren

Paragon (1271)

ren's picture

19-07-2016, 21:55

Ha, I edited my message / corrected myself already.. Smile
Though we could play with filters and stuff.. Wink

By ricbit

Champion (438)

ricbit's picture

20-07-2016, 01:32

Here's something fun for you. Every game must have a busy wait in order to sync with the virq. I wanted to find out where busy wait of Aleste 2 was, but debugging is tedious so I wrote a script for it. Works like a charm, and should also work for every other game, in case someone wants to reuse it.

set near_jumps [dict create]
set last_pc 0

proc find_busy_wait {} {
  debug set_condition {[reg pc] != $last_pc} {
    if {[reg pc] < $last_pc && [reg pc] > [expr $last_pc - 10]} {
      dict incr near_jumps [reg pc]
    }
    set last_pc [reg pc]
  }

  debug probe set_bp VDP.IRQvertical {} {
    foreach addr [dict keys $near_jumps] {
      if {[dict get $near_jumps $addr] > 10} {
        puts stderr [format "%04X" $addr]
      }
    }
    set near_jumps [dict create]
  }
}

By Louthrax

Prophet (2093)

Louthrax's picture

20-07-2016, 02:08

Nice mastering of TCL. I should try to get into TCL... but my brain is a bit tired with all the different script systems I had to use these last years (Python, Perl, Javascript, Lua, Ruby... Pffffff....).

Might use your script for Undeadline. There's already a R800 version that handles FM-PAC but the scanline is out of sync (and IIRC this patch is a different boot disc).

By ricbit

Champion (438)

ricbit's picture

20-07-2016, 02:32

+1 for a proper R800 version of undeadline, this game plays so much better on R800.

By mfeingol

Champion (266)

mfeingol's picture

20-07-2016, 03:29

I will say the thing that surprised me the most when I finally got an ST was how many games with FM didn't like running in R800 mode. It made me kind of sad.

So great to see people work on patches for this kind of thing.

By ricbit

Champion (438)

ricbit's picture

20-07-2016, 04:40

Now that I know where is the busy wait of Aleste 2, I can measure how much the R800 reduces the slowdowns. I used this script to measure slowdowns:

set histogram [dict create]
set irqcount 0

debug set_bp 0x54a5 {} {
  dict incr histogram $irqcount
  set irqcount 0
}

debug probe set_bp VDP.IRQvertical {} {
  incr irqcount
}

proc dump_hist {} {
  global histogram
  foreach count [lsort -integer [dict keys $histogram]] {
    puts stderr [format "%d %d" $count [dict get $histogram $count]]
  }
}

These were the results for Z80 (first column is number of interrupts between the busy wait loops, second column is how many times this happened).

2 263257
4 32020
6 620

And these for R800:

2 267368
4 273

Almost no slowdows on R800 Smile

By ricbit

Champion (438)

ricbit's picture

20-07-2016, 05:47

In relative terms, Z80 had 11% of slowdown, while R800 has only 0.1%. That's impressive.

By ARTRAG

Enlighted (6275)

ARTRAG's picture

20-07-2016, 07:42

Does the game go at half rate (30 or 25Hz)?

By ricbit

Champion (438)

ricbit's picture

20-07-2016, 15:35

I think it's 60Hz, but for reasons that I don't understand yet, "debug probe set_bp VDP.IRQvertical" triggers twice on each interrupt. For my measures it doesn't matter, because I'm interested in relative performance, but I surely welcome suggestions to make it trigger only once.

Page 11/18
4 | 5 | 6 | 7 | 8 | 9 | 10 | | 12 | 13 | 14 | 15 | 16