Jump to content
Asmusr

Pyjamarama

Recommended Posts

My next game is going to be a port of Pyjamarama from the ZX Spectrum. I'm currently approximately 50% done.

 

post-35226-0-91018300-1543601861.png

 

The reason I chose this game is that the action-adventure genre seems to be under-represented on the TI. I looked for source code and found this excellent disassembly of the Spectrum version: http://www.luny.co.uk/. Thanks to Luny whoever you are... :)

 

The source code itself is excellent for portability because it's much less hard-coded than other things from the period. The data structure for the room graphics can be used directly on the TI, and even the game logic (what you need to do to complete different tasks) is coded into a device independent byte code language that just needs a simple interpreter to be executed.

 

For the graphics, anything the Spectrum can do can also be shown on the TI. We have 8 bytes of color per character where the Spectrum has only one (a color attribute). Spectrum games often rely on color attributes for collision detection, but managing a virtual copy of the attribute table in CPU RAM is easy enough. All sprites are 16x16 which makes it easy to map them to TI sprites, but there are some places with more that 4 sprites on a row that I need to deal with.

 

As it looks now I will be done before Christmas, but you never know, of course.

 

post-35226-0-76614300-1543604313.png

 

The Spectrum has 48K so fitting this into 32K might be a struggle. I think a disk version with Super Cart will be one option. Another will be a cartridge with more graphics and sound.

Edited by Asmusr

Share this post


Link to post
Share on other sites

One thing I forgot to mention: with the conversion of Knight Lore I more or less converted each line of Z80 assembly to TMS9900 assembly. For this conversion I follow the same subroutine structure as the original source code but I recode each routine. [edited for clarification]

Edited by Asmusr

Share this post


Link to post
Share on other sites

One thing I forgot to mention: with the conversion of Knight Lore I more or less converted each line of Z80 assembly to TMS9900 assembly. For this conversion I consider the source code and make more or less the same subroutines, but the individual assembly op-codes and directives are very different.

 

That's a nice site, I love how well laid out the disassembly is! That makes conversion a heck of a lot easier.

 

TMS9900 assembly often lends itself to a more compact listing, since we can do memory-to-memory operations, and have MPY and DIV as well. All that is critical since our opcodes do take 2 bytes each, as opposed to the 1 byte on a Z80 or 6502.

Share this post


Link to post
Share on other sites

Nice Ramus, looking forward to it, I never played the game, but I know the titlescreen

(also never saw it in colour btw).

 

But try to run the disk attached (it has more moving pictures),

Disk format is CF-card (400Kb).

 

 

use EA option 5 to run DSK1.PPYJAMA

(it does not work in js99er.net and classic99 Tursi is updating it in the next version)

 

 

Video PPAJAMARAMA using V9T9 emulator:

MovingPic-PPYJAMARAMA.mp4

 

DISK:

0175-Animation.dsk

Share this post


Link to post
Share on other sites

Hello Asmur (and others),

 

I stumbled across your posting and just had to join and comment here.

I'm so glad my disassembly of Pyjamarama came to some use, this is the reason why I do these, in the hope someone will use it for a port or remake.

 

Secondly well done, that video of your port looks excellent, very accurate. Do you have a site where you host this stuff, I would love to put a link on my site?

 

cheers

Luny

Share this post


Link to post
Share on other sites

Hello Asmur (and others),

 

I stumbled across your posting and just had to join and comment here.

I'm so glad my disassembly of Pyjamarama came to some use, this is the reason why I do these, in the hope someone will use it for a port or remake.

 

Secondly well done, that video of your port looks excellent, very accurate. Do you have a site where you host this stuff, I would love to put a link on my site?

 

cheers

Luny

 

Thanks again for the disassembly. My project doesn't have a public site yet, except for this topic. When I finish the game I will post it here and upload the code to github, so this is probably the best place to link to.

Share this post


Link to post
Share on other sites

Rasmus, I've always wandered about Pyjamarama on the TI99/4a ... I always saw it as a viable conversion. Glad you're onto it! And it's looking brilliant. It looks like a cross between the Spectrum version with the hardware sprites of the C64, which is a brilliant go-between.

Share this post


Link to post
Share on other sites

Rasmus, I've always wandered about Pyjamarama on the TI99/4a ... I always saw it as a viable conversion. Glad you're onto it! And it's looking brilliant. It looks like a cross between the Spectrum version with the hardware sprites of the C64, which is a brilliant go-between.

 

Yes it's extremely very suited for the 9918A. There are almost no problems with the 4 sprites per line limitation. The only screen that has to use software sprites is the arcade/space invaders mini game where there are 8 sprites per line.

 

There are also many more sprite patterns than what fits into the VDP sprites pattern table (even for wally alone), so I had to implement a mechanism for uploading patterns on the fly as needed.

 

One change I will make from the original is to slow down the animations. I think it's a shame to spend time and memory on making lots of sprite frames and then display them so fast that you can't see what's going on. Wally is supposed to scuff along in his nightmare instead of the frantic movement seen in the Spectrum version.

Share this post


Link to post
Share on other sites

Random views of the current state of the game:

 

 

This also shows the slowed down animations.

Edited by Asmusr

Share this post


Link to post
Share on other sites

 

I've been asked the same of my game. It seems a lot of 99'ers aren't aware of what the 9918A can do...

I thought i remember you saying everything you made going forward was going to need SAMS and F18a.

 

No. What makes you think that?

"The only screen that has to use software sprites is the arcade/space invaders mini game where there are 8 sprites per line."

Seeing as how 4+ sprites makes flicker, i read that and thought this would need the F18a.

Share this post


Link to post
Share on other sites

I thought i remember you saying everything you made going forward was going to need SAMS and F18a.

"The only screen that has to use software sprites is the arcade/space invaders mini game where there are 8 sprites per line."

Seeing as how 4+ sprites makes flicker, i read that and thought this would need the F18a.

 

On the contrary, none of my finished games require SAMS or F18A. Dungeons of Asgard require SAMS and Super Mario Bros require F18A, but those have never been finished.

 

Space invaders games don't really require sprites. You just need to define enough characters to animate the transition between one horizontal position and the next.

Share this post


Link to post
Share on other sites

 

Thanks again for the disassembly. My project doesn't have a public site yet, except for this topic. When I finish the game I will post it here and upload the code to github, so this is probably the best place to link to.

 

OK, that would be great, I'll keep my eye on your great project. Maybe learn something about the TI along the way. :)

Slowing down the animations works really well, I should have thought of that for my c# version.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...