Jump to content
IGNORED

VBXE Exercise - Popeye WIP


woj

Recommended Posts

9 hours ago, 351cougar said:

if you are so close to staying inside 64k then keep shooting for that otherwise what are the chances of someone ONLY putting in a VBXE but no other additions? Then if you are forced into that space (128K), use it. revisit any compromises you had to make for memory before. 

I suspect that 99.9% of users do have a memory extension along the way, many U1MB quite likely. This is, however, a matter of principle, if the game can fit in 64K, it should, the same way it should be DOS friendly if there is no reason not to be. I will need a couple of more bytes for the auto-play / attract mode thing (yesterday evening I figured out how to do it memory efficiently and simple at the same time), but I also have a couple of places to squeeze few bytes out. I am not touching the RAM under OS at the moment, this could work and allow me to easily stick the rest (sound) there, but again, this might not be all-situations-and-DOSes-friendly (SDX RAM under OS configuration comes to mind).

 

Yesterday I also measured how much frame-time I have left for sound servicing, turns out plenty, so I am at the state of needing to code a couple of more things in for the attract mode and "just" putting together the soundtrack (using a suitable library / tracker, it will probably be RMT, but I have not yet committed to the choice). Considering I know nothing about music making, and that I am essentially tone-deaf, this is not going to be a quick process 😕 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

I suspect most VBXE owners would follow the path I did.

My 800XL initially had just 64K so I installed VBXE and used the R core to emulate the Rambo expansion.

Then I got U1Meg and switched to the A core.

 

Unless you're really short on VRam you should be able to fit in 64K and use the VBXE VRam for program use as well regardless if the system is using A or R core.

  • Thanks 1
Link to comment
Share on other sites

47 minutes ago, Rybags said:

Unless you're really short on VRam

There is indeed close to 64K of it left IIRC, so this is a solution! 

 

And no, the R core won't work I think, need to verify if I check for A core in the init routine.

Link to comment
Share on other sites

In theory you should be fine with either core type so long as you don't assume a machine with >64K of PORTB accessible Ram has that memory seperate from VBXE - then attempt to use both as if they were seperate entities on a machine where they're shared.

There's methods to detect configurations, not sure if there's ready to run routines sitting around though.

Link to comment
Share on other sites

14 minutes ago, Rybags said:

There's methods to detect configurations, not sure if there's ready to run routines sitting around though.

Already found that and fixed it ;) I was also thinking that the R core should just work (unless the underlying DOS like SDX makes use of it, this could be a problem during loading or saving high scores), so I will just leave a warning there if I see R core. 

Link to comment
Share on other sites

Weekly update, albeit only with a video again. First, the attract mode got implemented, the actual play script(s) (I plan to have two, maybe three if space permits, though they are rather small, ~200 bytes per script) for demo games will have to be re-recorded once the game parameters are polished and all sound is in place, some timings will surely change and affect the script. For now there is one where I failed to put the barrel on Bluto's head, because he chooses to walk up the first stairs after water recovery (an unlikely event in general). 

 

Otherwise, I spent time hooking up RMT into the game. This was a bit of a bumpy ride. First, the "official" version 1.28, when run on WINE/Linux, for some reason exports the stripped RMT file with the first $FF byte missing. I chased non-existing bugs in my code for half a day before I noticed the file is simply slightly corrupted, after that it just worked (my hat goes off to @JAC! for his recent tutorial additions on RMT, thanks!). Then I thought I'd check what @VinsCool's spin-off 1.34 version would do for me, there I hit a brick wall, even though I was really motivated - the Ilusia demo song sounds so much better on RMT 1.34. The problem was getting the in-game player to work, or even to compile with the right set of parameters. When I finally managed to get a good looking binary (or so I thought), it turned out the whole thing does not fit into the space I have left. The best I achieved was a slightly corrupted game with no sound, the worse cases where the game would crash right upfront after loading. I could probably spend another day or so to get successful with this, however, the massage here and there is that I should stick to the "official" standard version 1.28 for "non-professional" / game use, especially that the Popeye soundtrack does not seem to be overly fancy.

 

So, for now the Ilusia tune is playing along the game, see the video, this was mostly to be sure my code is RMT ready and I know how to deal with it, on the programming side. Following the earlier hint I got from @Rybags, I now also have full 16K window in the VBXE memory for sound data!.

 

This brings me to the next point, I realized that I know absolutely J.S. about making (POKEY) music, despite watching tutorials, reading about POKEY in De-Re Atari, and many other things. Programming-wise this is currently a non-issue for me, modding the RMT player module to have dynamic Mono/Stereo switching upon stereo detection seems very doable, for example. But making the actual music or SFX is for now totally beyond me, I will need serious help here, and yes, I know who to ask ;) 

 

 

  • Like 14
Link to comment
Share on other sites

46 minutes ago, MARIO130XE said:

If someone need the original arcade music ripped as mp3, click the link.

 

Popeye (Arcade) (gamerip) (1982) MP3 - Download Popeye (Arcade) (gamerip) (1982) Soundtracks for FREE! (khinsider.com)

 

Maybe it helps to create the RMT versions.

 

greetings

Thanks for this, I am ahead of you though ;) There is a YT recording with all clean tracks of the game (no SFX though), and I did exercise / research on using Audacity to recover the notes, very doable with a suitable plug-in. With multi-channel music (game and level intros, for example) this is difficult, so I hacked the M.A.M.E. sources to extract all three channels separately from the game, to dump them in the cleanest possible form into WAV files. I also managed to already compose the level 1 tune in RMT, the notes for that were taken from the 7800 pokey engine that was used for the 7800 Popeye. I still have a steep slope to climb, I got the very basics of RMT into my head, but editing a proper instrument for this is still difficult, what I am getting so far sounds OK, but it is not yet what I want to have, and in fact, I am not yet 100% what it is that I actually want to have there ;) 

  • Like 6
Link to comment
Share on other sites

It seems I will be getting a divorce with RMT :( I receive this program as something that makes complex things easy, but easy things complicated. I just couldn't get the two channel 16 bit note out of it the way I wanted. Instead, I wrote a small POKEY routine of my own, 217 bytes (!) that plays the level 1 back tune the way I want it, more or less. I think it might need to be a bit faster, and will defo need tweaking, but for now I am happy with the achievement. Sample attached.

 

 

 

 

  • Like 13
Link to comment
Share on other sites

2 hours ago, woj said:

It seems I will be getting a divorce with RMT :( I receive this program as something that makes complex things easy, but easy things complicated. I just couldn't get the two channel 16 bit note out of it the way I wanted. Instead, I wrote a small POKEY routine of my own, 217 bytes (!) that plays the level 1 back tune the way I want it, more or less. I think it might need to be a bit faster, and will defo need tweaking, but for now I am happy with the achievement. Sample attached.

 

 

pokey.xex 217 B · 0 downloads

That sounds awesome, great bass.

Link to comment
Share on other sites

The learning curve is so steep for me with Pokey, but I am getting somewhere, and honestly, I never had so much fun before programming something :D. Attached first version (mono and stereo attempt) of what I made up for the game intro tune. Sorry, no XEX, it's in a real mess with a whole bunch of debugging keys and such, only usable by me, I am too lazy to write a how-to. I have listened to all this so many times that now I am getting the impression that the notes are out of tune (and I am seriously tone deaf, I really have to rely on numbers and mathematics here), even though, at least for the higher pitch single channel ones, I used the same divisors as RMT uses.

 

(Oh, and I also have all single bass back tunes for all levels, but still missing the spinach tune, intros and outtros).

 

 

 

 

  • Like 12
Link to comment
Share on other sites

  • 3 weeks later...

I think I got the melody tunes where I want them to be, complete soundtrack attached in both mono and stereo (tunes in different orders in each). I also worked out all of the SFX, but I still need to manage the code and priorities for those, so no recording yet. I noticed that my previous stereo track posted above was playing horribly on my Android phone, not sure the reason. There is also one more phenomenon that I need to figure out, the stereo version sometimes changes what I would call phase between left and right channel. Don't know yet if that is due to emulation (I haven't played it yet on real hardware), or something about left and right Pokey timing that I messed up. If anyone knows what could possibly be going on, do not be shy to speak up ;) 

 

(The three speeds for the "Popeye ate spinach" tune were a real bitch to be honest, in the slowest and the fastest version the ending requires half frame Pokey updating, this on its own is not a big problem, but it is when it should be integrated with a heavy game loop code, but I think I got it sorted out, at least in my head). 

 

 

 

  • Like 11
Link to comment
Share on other sites

  • 2 weeks later...

So, it seems there is a game :) Music integration was at the one hand smooth, on the other hand debugging sound is awful, can't really frame freeze it to "look" at it, I mean you can, but so what. And I still have to review the MONO mode, I only tested STEREO extensively. Anyhow, sound integration was a bit of a bumpy ride. After that there were a multitude of small fixes (like the speed of Popeye walking animation off and on spinach), and at the very last stretch today I thought for the moment I will have to completely rewrite the round 3 ladder adding/drawing procedures. Reason - I have VBXE combined with Sophia 2 (the latter for the true interlace mode) on my real machine, and these two together gave an awful shadow of the round 3 ladder (the ladder is always there, it appears when the VBXE mapping attributes for the ladder tiles are changed). Luckily, after a longer period of panic and denial I found a quick solution, resetting the stock PFx colors (that are in fact never used) all to zero removed this interference. (I checked my old videos, this does not happen with the real GTIA, interesting...) .

 

Anyhow, drop me a PM if you want to beta test it ;) 

 

 

  • Like 18
Link to comment
Share on other sites

15 hours ago, Mathy said:

Hello woj

 

Why do you use 40 column text for the Quick Instructions although the screen is already switched to 80 column display?

 

Sincerely

 

Mathy

 

 

For the same reason the SDX boot message is in 40 columns ;) The screen is universal for both modes 40 and 80. I ran it with SDX / VBXE driver mostly to showcase that the game does not interfere with the SDX VBXE driver more than anything else. It would be possible to detect the 80 column mode and adapt, however, this message is typically read once per new user, no point in making it beautiful.

  • Like 2
Link to comment
Share on other sites

Something that just swiped me off my feet, I did byte / line counts on the sources 😮

 

The core game code I wrote, this includes the Pokey tunes data (effectively all hand crafted): 588 kbytes, 73k LoC

The generated (using Python scripts from the original game pixel data and other stuff that was easier to do it this way) code: 356 kbytes, 11k LoC  

 

And that does not even include the Python code. Statistically, I wonder how it all even loads and starts ;)

  • Like 3
Link to comment
Share on other sites

On 12/17/2023 at 1:28 PM, woj said:

So, it seems there is a game :) Music integration was at the one hand smooth, on the other hand debugging sound is awful, can't really frame freeze it to "look" at it, I mean you can, but so what. And I still have to review the MONO mode, I only tested STEREO extensively. Anyhow, sound integration was a bit of a bumpy ride. After that there were a multitude of small fixes (like the speed of Popeye walking animation off and on spinach), and at the very last stretch today I thought for the moment I will have to completely rewrite the round 3 ladder adding/drawing procedures. Reason - I have VBXE combined with Sophia 2 (the latter for the true interlace mode) on my real machine, and these two together gave an awful shadow of the round 3 ladder (the ladder is always there, it appears when the VBXE mapping attributes for the ladder tiles are changed). Luckily, after a longer period of panic and denial I found a quick solution, resetting the stock PFx colors (that are in fact never used) all to zero removed this interference. (I checked my old videos, this does not happen with the real GTIA, interesting...) .

 

Anyhow, drop me a PM if you want to beta test it ;) 

 

 

Awesome ! when the demo file to test itt too my dear Woj.

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...