Author Topic: SPEED-UP patch FOR Pac-Man emulator for CPC by SyX & TotO  (Read 12654 times)

0 Members and 1 Guest are viewing this topic.

Online CraigsBar

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.870
  • Country: ie
  • The party ain't over yet
    • index.php?action=treasury
  • Liked: 965
Pacman emulation on an Amstrad CPC was good before, Now it is amazing. I am hooked all over again.


The extra speed makes this the must have retro game.


I just LOVE it. Great work to all involved. :D


Craig

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.092
  • Country: br
  • Liked: 972
Thanks everybody for all the nice words. At the end work and life has not let me finish the v1.1 yesterday (today for me yet), but along the day and after everything is tested, it will be available, there is a few extra fixes aside the amazing patch of 40Crisis. For example, the shaking when pacman goes up/down.

I modified the arnold emulator to do  statistics on CPU cycles, track I/O locations in memory, track read/write to memory/screen memory,etc.. The problem is that my code is consuming a lot of CPU and need to be optimised.
So the emulator doesn't run at full speed. Another problem is that I'm using the windows version and even without profiling code, directx sound rendering is jerky and comes late.

I know that arnoldemu has made a lot of improvements since the last release, and i'm sure that when the new version is available, your developing system will improve.

Ah, 40Crisis i have reworked your patch and now the game runs without interrupts at all (only the initialization interrupt, that is executed once). This has let me to save a few more scanlines because i don't need to save/restore any register in the stack in both old interrupt routines, arcade and cpc.

Everything looks more clear now and for example the old cpc interrupt routine is now called cpc_emulation_code. And the only extra optimizations that i can think now is align a few tables to $xxx0 address for change a few 16 bits INCs to 8 bits, but i don't know if i will do or not, because destroy the clarity a little and doesn't save much more cpu time.

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.092
  • Country: br
  • Liked: 972
As i promised, Pac-Man v1.1 (codename Arcade Edition) is here.

I would like to thank 40Crisis again, because his speed-up hack makes the game totally enjoyable now and because during the process of adding it, let me to add a few extras optimizations and fixes (always great for a hacker mind) and making good the reason because i publish the sources of my projects.

PS: Remember that you need to add the rom files to the DSK.
« Last Edit: 21:12, 05 June 14 by SyX »

Offline Carnivius

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.244
  • Country: gb
  • Mayhem Attack Squad
    • index.php?action=treasury
  • Liked: 829

PS: Remember that you need to add the rom files to the DSK.

How do I do this?   I have the arcade rom (from my MAME roms directory) and I can see what I assume to be the four files mentioned in your pacman's readme file but I don't know how to use Winape to put the roms in the dsk.
Favorite CPC games: SwitchBlade, Stryker in the Crypts of Trogan, Turrican II, UN Squadron, Oh Mummy

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.092
  • Country: br
  • Liked: 972
How do I do this?   I have the arcade rom (from my MAME roms directory) and I can see what I assume to be the four files mentioned in your pacman's readme file but I don't know how to use Winape to put the roms in the dsk.
Go to menu File -> Drive A -> Edit Disc or Shift + Ctrl + F1, and drag and drop the rom files to the dsk.

Offline Carnivius

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.244
  • Country: gb
  • Mayhem Attack Squad
    • index.php?action=treasury
  • Liked: 829
ok I did that and instead of the pacman picture flashing reds it now fades to black but then nothing. 
Favorite CPC games: SwitchBlade, Stryker in the Crypts of Trogan, Turrican II, UN Squadron, Oh Mummy

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.092
  • Country: br
  • Liked: 972
ok I did that and instead of the pacman picture flashing reds it now fades to black but then nothing. 
Mark the checkbox that put Add/Remove AMSDOS headers.
Must be only that.

Offline Carnivius

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.244
  • Country: gb
  • Mayhem Attack Squad
    • index.php?action=treasury
  • Liked: 829
Mark the checkbox that put Add/Remove AMSDOS headers.
Must be only that.

That seems to have done it.  Thanks! 
Is all working now.  I loves Pac-Man!  :)
Favorite CPC games: SwitchBlade, Stryker in the Crypts of Trogan, Turrican II, UN Squadron, Oh Mummy

Offline 40Crisis

  • CPC464
  • **
  • Posts: 38
  • Liked: 115
As i promised, Pac-Man v1.1 (codename Arcade Edition) is here.

I would like to thank 40Crisis again, because his speed-up hack makes the game totally enjoyable now and because during the process of adding it, let me to add a few extras optimizations and fixes (always great for a hacker mind) and making good the reason because i publish the sources of my projects.


PS: Remember that you need to add the rom files to the DSK.

Many thanks for this new release

Just a question about something I have seen in the game since version 1.0

the ghost sprites when overlapping other ghost or pacman seem to be unmasked (see screen snasphots)
Black color appears not to transparent. But you hardly notice it.

Is it a bug or feature ? ;)


Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.092
  • Country: br
  • Liked: 972
Many thanks for this new release
You are guilty of making this release possible :D

Just a question about something I have seen in the game since version 1.0

the ghost sprites when overlapping other ghost or pacman seem to be unmasked (see screen snasphots)
Black color appears not to transparent. But you hardly notice it.

Is it a bug or feature ? ;)
Feature!!! :)

My first implementation printed everything as masked sprites (ghost, pacman and fruits), but the framerate was so low that i changed a lot of things, fruits are printed like tiles, ghosts are non-mask sprites and preshifted and only pacman is the only one masked, because our goal was getting the maximum speed possible.

And as you said is difficult to notice it, because your eyes are mainly centered in pacman... and now is even more difficult to see with the extra and constant speed, jejeje.

Another optimization trick related to those efforts in get enough speed, it's that one of the pre-shifted frames of the ghosts lost one pixel column in the right, but during the game is hard to see too, jejeje.

When you can not get enough cpu speed, then is time of doing illusion tricks, jajaja.
« Last Edit: 23:31, 05 June 14 by SyX »