Pacmania

All about ST/STE games

Moderators: simonsunnyboy, Mug UK, Doctor Bob Gordon, ICS, Moderator Team

Zamuel_a
Atari God
Atari God
Posts: 1218
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: Pacmania

Postby Zamuel_a » Sat Sep 01, 2012 9:53 pm

aha, were did you find that info about the sprites?

Yes, an assembler can do that. Just take the DC.B statements, assemble them and save them as a binairy (not a program).


Wasn't so easy to do. There are alots of labels in the data so I would have to split it into thousands of small files. I don't know how the dissambler works, but probibly most of those labels doesn't matter, but not so easy to find out which one.

What does it mean when you can see inside the code:
L0168:DC.L L0671

L0671 is a lable in the big chunk of data, but it looks like most of the labels there are as a reference to a DC.L somethere else in the code.
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

Zamuel_a
Atari God
Atari God
Posts: 1218
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: Pacmania

Postby Zamuel_a » Sat Sep 01, 2012 10:04 pm

I don't understand. When a game is running at 50 fps I expect every frame to be a new frame. On the ST the game is running at 25 fps. When going right or left the screen is shifted to the right or left with for pixels. When going up or down the screen is shifted 3 lines up or down and 2 pixels to the right or left.


So it's not 4 pixels in both X and Y direction? If it were, when it is much easier, 25fps = 4 pixels, 50fps = 2 pixels.

Are you sure it's only 25fps on Atari? It looks smoother when I run it, but I do it on a emulator on a LCD monitor and it's difficult to see the speed here compared to a CRT

What does the ST statements mean that the dissambler creates?
For example it says
ST L006 in the middle of the code and from what I know, ST isn't a real command
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

User avatar
Nyh
Atari God
Atari God
Posts: 1496
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: Pacmania

Postby Nyh » Sat Sep 01, 2012 10:21 pm

Zamuel_a wrote:aha, were did you find that info about the sprites?

I used the ADRENALINE ripper to look at the program.

Zamuel_a wrote:Wasn't so easy to do. There are alots of labels in the data so I would have to split it into thousands of small files. I don't know how the dissambler works, but probibly most of those labels doesn't matter, but not so easy to find out which one.

A disassembler generates only a label when one is needed. I think all the labels matter.

Zamuel_a wrote:What does it mean when you can see inside the code:
L0168:DC.L L0671

L0671 is a lable in the big chunk of data, but it looks like most of the labels there are as a reference to a DC.L somethere else in the code.

It means that at L0168 the location for L0671 is stored. I expect there are a lot of tables with pointers to memory locations. For example for the animation of the main sprite. Every ghost has its own table with a pointer to its data and eyes, a table with pointers to the different fruits and the scores for those fruits and so on and so on.

Zamuel_a wrote:So it's not 4 pixels in both X and Y direction? If it were, when it is much easier, 25fps = 4 pixels, 50fps = 2 pixels.

No, in the game the width of a block is 32 pixels, and it is only 24 pixels high.

Zamuel_a wrote:Are you sure it's only 25fps on Atari? It looks smoother when I run it, but I do it on a emulator on a LCD monitor and it's difficult to see the speed here compared to a CRT

Yes, it is only 25 fps on the Atari. I used STeem in debug mode and emulated one frame at a time. Only every second frame the screen gets an update -> 50 fps.

Hans Wessels

User avatar
Nyh
Atari God
Atari God
Posts: 1496
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: Pacmania

Postby Nyh » Sun Sep 02, 2012 9:52 am

I took the liberty of liberating the Pacmania Gfx from its program:
SPRITES.png

GHOSTS.png

Included is the source of the rip program and the PI1 files.

Hans Wessels
You do not have the required permissions to view the files attached to this post.

User avatar
qq1975b
Atari God
Atari God
Posts: 1062
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: Pacmania

Postby qq1975b » Sun Sep 02, 2012 10:27 am

Wow! :D
Do you need the original arcade music? I have it in .mp3
Trying to learn...

Zamuel_a
Atari God
Atari God
Posts: 1218
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: Pacmania

Postby Zamuel_a » Sun Sep 02, 2012 10:35 am

Mp3 won't do anything since it's not possible to play it on the Atari. It has to be the original Amiga MOD format.
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

User avatar
Nyh
Atari God
Atari God
Posts: 1496
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: Pacmania

Postby Nyh » Sun Sep 02, 2012 11:11 am

qq1975b wrote:Wow! :D
Do you need the original arcade music? I have it in .mp3

I think we need better Gfx. Especially the main sprite.
I think we need the meaning of the different kinds of fruit. And their points.

Hans Wessels

User avatar
qq1975b
Atari God
Atari God
Posts: 1062
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: Pacmania

Postby qq1975b » Sun Sep 02, 2012 11:54 am

Zamuel_a wrote:Mp3 won't do anything since it's not possible to play it on the Atari. It has to be the original Amiga MOD format.


OK! I will look for it.


Nyh wrote:I think we need better Gfx. Especially the main sprite.
I think we need the meaning of the different kinds of fruit. And their points.

Hans Wessels


Can them been get from the Amiga version?
Trying to learn...

Zamuel_a
Atari God
Atari God
Posts: 1218
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: Pacmania

Postby Zamuel_a » Sun Sep 02, 2012 12:16 pm

I think it's best to take all graphics and music from the Amiga version. They probibly use 32 colors on screen but that should be rather easy to reduce to 16 I think without giving up to much.

One interesting thing I saw is that all the yellow dots pacman eats are actually redrawn every time. I thought that they were part of the background and that the background behind got redrawn when you eat one, which sounds like a better idea to save cpu time.
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

swapd0
Atari User
Atari User
Posts: 40
Joined: Thu Dec 13, 2007 8:56 pm

Re: Pacmania

Postby swapd0 » Sun Sep 02, 2012 6:08 pm

Zamuel_a wrote:
What does the ST statements mean that the dissambler creates?
For example it says
ST L006 in the middle of the code and from what I know, ST isn't a real command


ST means set true, the opcode is Scc where cc is any conditional condition. So ST L006 is the same as move.b #-1, L006.

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 602
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Pacmania

Postby Anima » Sun Sep 02, 2012 6:13 pm

Probably this could be helpful:

http://walen.se/sprites/?level=album&id=53

Cheers
Sascha

User avatar
Nyh
Atari God
Atari God
Posts: 1496
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: Pacmania

Postby Nyh » Sun Sep 02, 2012 6:20 pm

Zamuel_a wrote:I think it's best to take all graphics and music from the Amiga version. They probibly use 32 colors on screen but that should be rather easy to reduce to 16 I think without giving up to much.

I think you get the best results with Degas or Neochrome and do them the proper way on a ST. I Agree, it is the hard way but no-one said making a good game is simple.

Hans Wessels

Zamuel_a
Atari God
Atari God
Posts: 1218
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: Pacmania

Postby Zamuel_a » Sun Sep 02, 2012 7:12 pm

Probably this could be helpful:

http://walen.se/sprites/?level=album&id=53

Cheers
Sascha


Ah ok, cool :) It looks like pacman and ofcourse the levels have more colors, but the ghosts are alittle worse than on ST. Well if anyone want's to create some STE friendly graphics it had been nice. :wink:
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

User avatar
qq1975b
Atari God
Atari God
Posts: 1062
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: Pacmania

Postby qq1975b » Sun Sep 02, 2012 7:56 pm

These sprites are from the Amiga version. This is enough to make the STE one, isn't it?
Can I help in something?
By the way, I found the blocktown (1st level) MOD music from the Amiga version and some from the Arcade in mp3, that I am going to convert to MOD (I hope so).
Trying to learn...

User avatar
Nyh
Atari God
Atari God
Posts: 1496
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: Pacmania

Postby Nyh » Sun Sep 02, 2012 8:59 pm

Anima wrote:Probably this could be helpful:

http://walen.se/sprites/?level=album&id=53

Very nice. The Amiga coders have done some very strange color allocation:
16 colors for the sprite, 9 for the ghosts and fruits and 8 for the field (the extra color is the shared background color. The Atari ST ghosts and fruits are better as the Amiga ones. On the Atari there are 4 colors allocated for the field, 8 for the main sprite and 14 colors are used for the ghosts and fruits.

I don't think we have to convert any Amiga Gfx, just give the main sprite a good dithering and we are done on the Gfx department.

Hans Wessels

Zamuel_a
Atari God
Atari God
Posts: 1218
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: Pacmania

Postby Zamuel_a » Sun Sep 02, 2012 9:28 pm

The playfield is what should benefit most of getting more colors. The sprites are ok I think.

I have looking into the code abit and sorted out some of the parts, but it's very hard to figure everything out. Alots of variables and there are alot of jumps everythere so not so easy to see what does what. Anyone has any good suggestions or maybe someone is very skilled at figure out this kind of stuff. To be able to make an STE version, we need the code to be more or less fully documented or else it's hard to change and replace parts of it. Had been good to have some sort of debugger so that it was possible to see what does what at a certain time.

Here are the sourcefiles anyway in case someone is good at this or just want to take a look:
pacmania.zip


I have used devpac assembler and it's working fine, but it takes along time to assemble since all the data are in DC statements.
You do not have the required permissions to view the files attached to this post.
Last edited by Zamuel_a on Sun Sep 02, 2012 9:48 pm, edited 1 time in total.
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

User avatar
qq1975b
Atari God
Atari God
Posts: 1062
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: Pacmania

Postby qq1975b » Sun Sep 02, 2012 9:43 pm

Yes. It would be great if the playfield gets more color.
Trying to learn...

User avatar
Nyh
Atari God
Atari God
Posts: 1496
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: Pacmania

Postby Nyh » Mon Sep 03, 2012 7:53 am

Zamuel_a wrote:I have used devpac assembler and it's working fine, but it takes along time to assemble since all the data are in DC statements.

The Turbo Assembler is a lot faster because it is a tokenizing assembler. The disadvantage is you can only edit the file in the Turbo Assembler editor.

I use the Pure Assembler from pure C most of the time. The big advantage with Pure C is the easy project management. You can split up the source in multiple files, assemble them separately and use the linker to knit everything together.

Hans Wessels

Zamuel_a
Atari God
Atari God
Posts: 1218
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: Pacmania

Postby Zamuel_a » Mon Sep 03, 2012 8:52 am

I'm used to Devpac so I like it and on an emulator it' ok. Just hit fastforward during the assembly time... Hopefully most of the DC statements can be changed into binary files. I could find some labels there that didn't have a reference anythere else. After the label there was a asm command that didn't make sense. I guess the dissambler saw something it thought was real asm code but in reality it was just data so it creates an unnecessary label.
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

User avatar
Mug UK
Administrator
Administrator
Posts: 11141
Joined: Thu Apr 29, 2004 7:16 pm
Location: Stockport (UK)
Contact:

Re: Pacmania

Postby Mug UK » Mon Sep 03, 2012 9:08 am

The other option might be to disassemble the original Amiga binary with ReSourcer (like Easyrider) as that might get more out of the data layouts/pointers?

No guarantee it would help though 8-)
My main site: http://www.mug-uk.co.uk - slowly digging up the bits from my past (and re-working a few): Atari ST, Sega 8-bit (game hacks) and NDS (Music ripping guide).

I develop a free Word (for Windows) add-in that's available for Word 2007 upwards. It's a fix-it toolbox that will allow power Word users to fix document errors. You can find it at: http://www.mikestoolbox.co.uk

Zamuel_a
Atari God
Atari God
Posts: 1218
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: Pacmania

Postby Zamuel_a » Mon Sep 03, 2012 9:15 am

The amiga binary had been best IF someone could dissamble it and comment everything in the code so that it would be a "easy" job to just convert it to Atari. Since you don't have a working version unless everything is converted it would be very hard to get it working if the code isn't commented. Working on the ST code is easier then since you always have a working version.
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 602
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: Pacmania

Postby Anima » Mon Sep 03, 2012 6:15 pm

Alternatively we can try to disassemble the X68000 version.

This is how the X68k version looks like - and yes, it looks like the original arcade version:

Image

So if we have to convert any other graphics to 16 colors we should use the original data. Ok, I am not sure why they shrinked the Amiga ghosts in size but I guess they probably had problems with the speed.

However, the X68000 version is totally different to the other ports and converting an X68000 game is not that easy also. But I still think porting Pac-Mania to the Atari STE is possible. An Atari Falcon version would be nice also (of course with original graphics).

X68000 programs have a big advantage for disassembling because they are commonly not protected (hello Rob Northen). Also the sprite hardware is a fixed implementation so you have an interface for the sprite "emulation". Almost every game uses the hardware sprite engine and there's no trickery for displaying a sprite like the well known preshifting on the Atari ST.

So what needs to be done for this? At first there are some nice tools for the X68000:

An X68000 emulator with some nice debugging features (disassembler display, sprite graphics display, background graphics display, etc.): XM6 Pro-68k X68000 emulator

An Human68k toolchain (GCC cross compiling tools for the X68000): Cross-Human68k toolchain

Steps to be done:
  • A good disassembled source for the Pac-Mania program to be reassembled with the toolchain so that it would run on the X68000 again (like you already did with the Atari sources).
  • Commenting the source.
  • Converting the graphics using 16 colors can be done in parallel.
  • Replace X68000 hardware addresses within the code with equivalent memory spaces in the bss area.
  • Use Atari interrupts for emulating the X68000 timer/vbl/joystick/keyboard functions.
  • Make a "dry run" of the resulting program on an Atari without any graphics and sound (at least the attract mode should run virtually).
  • Implement Atari STE sprite, sound and background routines step by step.

As you can see I am interested in porting games to the Atari as well. Especially X68000 games. ;)

What do you think?

Cheers
Sascha

Zamuel_a
Atari God
Atari God
Posts: 1218
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: Pacmania

Postby Zamuel_a » Mon Sep 03, 2012 6:41 pm

Well it looks good, but is not possible to do on an STE OR Amiga. Atleast not if we want it to run at 50fps. The colors on screen are probibly more than 16, but that's not the problem. If you look at the ghosts, they are BEHIND the walls, which means that you can not use hardware scrolling and need to keep track of the layers on how you want to draw it. It is almost like draw it in "real 3d".

Doing it on a Falcon would be nice! If anyone want's to!
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

User avatar
nativ
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 4087
Joined: Mon Jul 30, 2007 10:26 am
Location: South West, UK

Re: Pacmania

Postby nativ » Mon Sep 03, 2012 7:10 pm

As you can see I am interested in porting games to the Atari as well. Especially X68000 games.

What do you think?


Good idea! I like to see Parodius and maybe SFII.

It would be great if it's possible! And maybe open it up to the jaguar too! Falcon is going to be the best starting point probably? As Zamuel_A mentions it uses a different angle on the 3D, so it's a must to 'crack' that technique on the STe. and on that note ... how about using solids? like a Vector Pacmania? :D 8) :idea:
Atari STFM 512 / STe 4MB / Mega ST+DSP / Falcon 4MB 16Mhz 68882 - DVD/CDRW/ZIP/DAT - FDI / Jaguar / Lynx 1&2 / 7800 / 2600 / XE 130+SD Card // Sega Dreamcast / Mega2+CD2 // Apple G4

http://soundcloud.com/nativ ~ http://soundcloud.com/nativ-1 ~ http://soundcloud.com/knot_music
http://soundcloud.com/push-sounds ~ http://soundcloud.com/push-records

User avatar
Nyh
Atari God
Atari God
Posts: 1496
Joined: Tue Oct 12, 2004 2:25 pm
Location: Netherlands

Re: Pacmania

Postby Nyh » Mon Sep 03, 2012 7:13 pm

Zamuel_a wrote:Well it looks good, but is not possible to do on an STE OR Amiga. Atleast not if we want it to run at 50fps. The colors on screen are probibly more than 16, but that's not the problem. If you look at the ghosts, they are BEHIND the walls, which means that you can not use hardware scrolling and need to keep track of the layers on how you want to draw it. It is almost like draw it in "real 3d".

Hiding the ghosts and Pacman partially behind walls is only a little bit more difficult then drawing them directly. The only thing you need to do is apply the mask of the tiles in front of you and right of you. A little work but not hard at all. Speed wise no problems to do so. For the rest of the X68000 version: nice when you have 256 colors available. On the ST we will have to work with 16 colors (but we can still improve on the Amiga version BIG time).

Hans Wessels


Social Media

     

Return to “Games - General”

Who is online

Users browsing this forum: No registered users and 1 guest