Jump to content
IGNORED

Popeye 7800: Mini-game


darryl1970

Recommended Posts

  1. I also cannot understand why the garbage is popping up on the screen.
    My best guess is that you're running out of time before all objects are plotted, and Maria is going ahead with the frame display anyway. If an object is partially displayed, it will be with some unintended attribute. (graphics pointer, width, etc) 
    Try plottext with the 7800basic "frameslost" variable. It will likely increase each time you have these glitches, if not more frequently.
    This kind of glitching can also happen when you use too many objects in a zone (see the compile output for how many objects you have per zone) but in this case the glitching won't disappear after a frame.
     
  2. I added frames for Brutus to sweep his hand down. That is 6 frames. The game displays a black screen if I "incgraphic" more than 4. I don't get a memory error, and I have not added any code to use the frames.
    Hard to say on this one from just a general description. Maybe the new incgraphics are causing other incgraphics to be pushed out of the tileset? Or maybe something else. If you post the compile messages it may be helpful, though I'd probably have some additional questions on how things are arranged.
     
  3. I reserved enough bottle registers for Brutus to be able to throw them. However, 1 Sea Hag, Popeye, Brutus, and a can of spinach is too much. I had to chop off the top of the ladder, in order to keep the bottle from disappearing.
  4. I tried to wrap hearts around Olive at the level clear. There are too many items displayed at the top of the screen. They will not all show. So, what I ended up with is due to a limitation of the number of sprites per line.
    There are two kinds of limits that keep objects from being displayed. One is caused by running out of CPU time left to draw objects. (the likely cause of your glitching, mentioned earlier) and the other is just giving Maria too many objects to render. My gut feel is you're running into the former problem, not the latter. Your best bet is to try and draw these objects first, and just "bake" each new heart into the display with "savescreen". Then you only need to plot a new heart once per frame.
    In terms of the bottles, based on their coarseness in the arcade version, I think they use tiles for these. If you can do the same, updating characters in a buffer is much quicker than plotting a bunch of sprites.

To maximize the number of sprites you can churn out, organize your game logic like this...

mainloop
   drawscreen
  [non plot* game logic. do any plot* preparation here, like updating position, animation, etc, without actually doing the plot*]
  [tight plot* commands, with as little logic between plot* commands as possible]
 goto mainloop

mksmith also documented an alternative to plotting the score and level info each and every frame in this post.

 

  • Like 2
Link to comment
Share on other sites

3 hours ago, Synthpopalooza said:

Firstly, the title music only uses 2 channels, so 16-bit $Ax on both channels will work nicely.  The other in game music might need 8-bit sounds unless we use TIA for game sfx

 

3 hours ago, Synthpopalooza said:

Specifically the arcade game uses the AY sound chip.  3 squares plus 1 noise.  POKEY can handle this easily, as not all the channels get used at once in the music.

 

The arcade game, after Popeye eats spinach, has melody, harmony, a bass line, and footsteps simultaneously. TIA can surely do the footsteps, which would allow 16-bit melody. TIA could conceivably also do the bass line, either in C with the G being sharp, or in-tune but transposed to E. Would 16-bit harmony would be worth that? I don’t know.

 

(Generally I prefer transposition to being even slightly out of tune, but I know not everybody does.)

Link to comment
Share on other sites

For that, 16 bit bass on $Ax, two 8 bit channels on $Ax for lead and harmony, and I dont think the footsteps sound while he has spinach?  will have to check.  If so, use TIA

 

I could always do AUDCTL=$61 to get 8 bit bass on $Ax and use $2x at 1.79 on the leads as well, if we really want that 4th POKEY channel for music.  The only drawback is that $2x has more of a tinny ringing timbre to it, but the tuning would not be a problem.

Edited by Synthpopalooza
Link to comment
Share on other sites

As i thought ... the bass track drops out while Popeye is running. :)  That's how they did it.  AY chip only allows three square waves and a noise channel.  So yeah, TIA for sound effects.  Including the $6x distortion in TIA for when Brutus (Bluto?) is jumping platforms.  We can improve things on the 7800 ;)

 

I think the music should stay 100% in POKEY.  I can get it 98-99% sounding like the arcade.  And stick with one 16-bit channel plus two 8-bits.  The 16 bit bass is totally worth it, especially with the results I got on the title music in Bentley Bear.

Edited by Synthpopalooza
Link to comment
Share on other sites

4 hours ago, Synthpopalooza said:

As i thought ... the bass track drops out while Popeye is running. :)  That's how they did it.  AY chip only allows three square waves and a noise channel.  So yeah, TIA for sound effects.  Including the $6x distortion in TIA for when Brutus (Bluto?) is jumping platforms.  We can improve things on the 7800 ;)

 

I think the music should stay 100% in POKEY.  I can get it 98-99% sounding like the arcade.  And stick with one 16-bit channel plus two 8-bits.  The 16 bit bass is totally worth it, especially with the results I got on the title music in Bentley Bear.

 

Well, I’m not sure what I was hearing. I thought the bass continued during spinach and it used noise for footsteps — both clearly wrong.

 

I have another question for you but I’ll ask it in the POKEY thread.

 

EDIT: never mind on the other question, I think I figured it out.

Edited by bizarrostormy
Link to comment
Share on other sites

From what I've observed, the Spinach music does contain bass accent notes. Popeye's footsteps are still audible during the spinach music. However, any other sound will cut out his footsteps, such as grabbing a heart, punching Brutus, etc.

 

I think Popeye footsteps could be done nicely with TIA, leaving Pokey for music.

 

The A8 music is available in SAP format. Most of the music is pretty good for the time. I know @Synthpopalooza can do better.

 

I considered using that, but I didn't know how to decode an SAP file. I couldn't even figure out how to set the register to combine channel 0 and 1, in order to play the lower register notes.

 

Link to comment
Share on other sites

SAP is basically an Atari .xex binary, with a wrapper, more or less.

 

As for 16 bit ... fairly simple:  AUDCTL=$50 (for first two channels) or $28 (last two).  Set $00 distortion on the first to silence that channel, and $Ax on the second.  The low order bytes go on the first channel and high on the second.  So to play C1 (which I think is $6ADD, can't remember offhand), $DD goes in AUDF0 and $6A in AUDF1.

 

 

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

22 minutes ago, Synthpopalooza said:

Also:  $Ax settings give the best results in emulation (ProSystem or A7800) ... I think there's some very high notes in 16-bit about C8 or C9 that A7800 won't play right, but that's sbout it

I will have to try this. I have some stuff to do now, but anxious to check it out. Thanks!

Link to comment
Share on other sites

29 minutes ago, TrekMD said:

I tried the latest version using ProSytem Emulator and the graphics get all messed up.  I haven't tried it with A7800 yet. 

I noticed the latest version will not play on my Android emulator (RetroArch), but it plays on A7800, and I tested it on my actual hardware.

 

The video below is shot while playing on my 7800 and Sony TV. Around 1:32 is the setup for the level clear.

 

 

Edited by darryl1970
Link to comment
Share on other sites

8 hours ago, Synthpopalooza said:

SAP is basically an Atari .xex binary, with a wrapper, more or less.

 

As for 16 bit ... fairly simple:  AUDCTL=$50 (for first two channels) or $28 (last two).  Set $00 distortion on the first to silence that channel, and $Ax on the second.  The low order bytes go on the first channel and high on the second.  So to play C1 (which I think is $6ADD, can't remember offhand), $DD goes in AUDF0 and $6A in AUDF1.

 

 

Lame question, but how do I set AUDCTL to $50 in 7800 Basic?

Link to comment
Share on other sites

1 hour ago, TrekMD said:

I tried the latest version using ProSytem Emulator and the graphics get all messed up.  I haven't tried it with A7800 yet. 

Hey TrekMD, please give BupSystem a shot.  Download the latest here.   :)

 

It has the ease and convenience of the ProSystem interface, but much better, and closer to hardware accurate, emulation.  Popeye works great there as well, just like the A7800 emulator and the console hardware.

  • Like 2
Link to comment
Share on other sites

I'll put up a quick and dirty explanation of what all AUDCTL affects.  There are 8 bits to the register, and here is how they work ... iterating from the lowest bit, to the highest:

 

bit 0 - replace default 64 khz clock with 15 khz clock on all four channels  ($01)

bit 1 - hi pass filter on channel 2, from channel 4 ($02)

bit 2 - hi pass filter on channel 1, from channel 3 ($04)

bit 3 - 16 bit on channels 3 and 4 ($08)

bit 4 - 16 bit on channels 1 and 2 ($10)

bit 5 - 1.79 mhz clock on channel 3 ($20)

bit 6 - 1.79 mhz clock on channel 1 ($40)

bit 7 - 9-bit polycounter enable for distortions $8x and $0x ($80)

 

The default setting $00 causes POKEY to use the standard 64hz clock.  You can play standard leads on $Ax distortions, and the basses can be played on $Cx distortions.  There are some tuning limitations at the high end though.  The $Cx basses also have rougher timbres, and in some cases some waveform variations due to polycounter sampling.

 

To enable 16-bit mode on the first two channels, you set bits 4 and 6 ($50).  Bit 4 ($10) enables the 16-bit mode, and bit 6 ($40) is to set a 1.79 clock on the first channel.  This is necessary to ensure that you have a playable note range on those channels.

 

When applied by itself, the 1.79 clock has the effect of transposing your notes up out of their usual range.  On normal 8-bit usage, it works best in $Cx and $2x distortions.

 

The 15 khz clock knocks your $Ax 8-bit channels down two octaves.  This is useful if you want to play bass notes without engaging 16-bit.  Any channels (1 and 3) clocked at 1.79 mhz won't be affected, so you can play lead sounds using $2x or $Ax and let your $Ax handle the bass parts.

 

The hi pass filter is fairly complicated ... but it basically uses the waveform on the higher channel to mask out elements of the lower channel.  This can be used to make swirling SID effects, or imitate the NES pulse wave, but it's usage is very complex.

 

Bit 7 changes the $8x and $0x noise distortions from a 17-bit polycounter to a 9-bit.  When a smaller bit polynomial is sampled, buzzy musical timbres can be had in this setting, especially in the $8x setting.

 

Edited by Synthpopalooza
  • Like 1
Link to comment
Share on other sites

1 hour ago, darryl1970 said:

I noticed the latest version will not play on my Android emulator (RetroArch), but it plays on A7800, and I tested it on my actual hardware.

Yikes, looks like the Android port of RetroArch uses the archaic ProSystem emulator as its core for the 7800.  This is comparable to using the Nesticle emulator as its core for NES. Atari 7800 emulation has come along way since ProSystem, and this explains the inaccurate representation of hardware results being experienced. 

 

MAME has a Libretro core, and while missing some of the fine tuning and additions of the A7800 emulator, it's 7800 console emulation is still worlds better than the ProSystem emulator. 

 

Wonder if there is a way to leverage the MAME Libretro core for Atari 7800 emulation with RetroArch, instead of the ProSystem Libretro core(?)

:ponder:

  • Like 2
Link to comment
Share on other sites

35 minutes ago, Trebor said:

Hey TrekMD, please give BupSystem a shot.  Download the latest here.   :)

 

It has the ease and convenience of the ProSystem interface, but much better, and closer to hardware accurate, emulation.  Popeye works great there as well, just like the A7800 emulator and the console hardware.

Thank you!  I'll give it a spin!  ProSystem hasn't been updated in some time so it has issues with some ROMs.

  • Like 2
Link to comment
Share on other sites

10 hours ago, Synthpopalooza said:

I'll put up a quick and dirty explanation of what all AUDCTL affects.  There are 8 bits to the register, and here is how they work ... iterating from the lowest bit, to the highest:

 

bit 0 - replace default 64 khz clock with 15 khz clock on all four channels  ($01)

bit 1 - hi pass filter on channel 2, from channel 4 ($02)

bit 2 - hi pass filter on channel 1, from channel 3 ($04)

bit 3 - 16 bit on channels 3 and 4 ($08)

bit 4 - 16 bit on channels 1 and 2 ($10)

bit 5 - 1.79 mhz clock on channel 3 ($20)

bit 6 - 1.79 mhz clock on channel 1 ($40)

bit 7 - 9-bit polycounter enable for distortions $8x and $0x ($80)

 

The default setting $00 causes POKEY to use the standard 64hz clock.  You can play standard leads on $Ax distortions, and the basses can be played on $Cx distortions.  There are some tuning limitations at the high end though.  The $Cx basses also have rougher timbres, and in some cases some waveform variations due to polycounter sampling.

 

To enable 16-bit mode on the first two channels, you set bits 4 and 6 ($50).  Bit 4 ($10) enables the 16-bit mode, and bit 6 ($40) is to set a 1.79 clock on the first channel.  This is necessary to ensure that you have a playable note range on those channels.

 

When applied by itself, the 1.79 clock has the effect of transposing your notes up out of their usual range.  On normal 8-bit usage, it works best in $Cx and $2x distortions.

 

The 15 khz clock knocks your $Ax 8-bit channels down two octaves.  This is useful if you want to play bass notes without engaging 16-bit.  Any channels (1 and 3) clocked at 1.79 mhz won't be affected, so you can play lead sounds using $2x or $Ax and let your $Ax handle the bass parts.

 

The hi pass filter is fairly complicated ... but it basically uses the waveform on the higher channel to mask out elements of the lower channel.  This can be used to make swirling SID effects, or imitate the NES pulse wave, but it's usage is very complex.

 

Bit 7 changes the $8x and $0x noise distortions from a 17-bit polycounter to a 9-bit.  When a smaller bit polynomial is sampled, buzzy musical timbres can be had in this setting, especially in the $8x setting.

 

Just as a point of reference, the "psound" command (line 911) plays then music. It's obvious that it's not in 16-bit mode. (I used distortion 6, because it sounded like a closer wrong).

Using the 8-bit conversion music, channels 3 & 4 are combined for music.

image.png.da392245b9823f3f45a3c9107216c5b2.png

 

I know I need to ditch the psound command, but my attempts from line, 914 to 918, produce silence.

 

I THOUGHT lines 914-918 would play then music (with line 911 commented out, of course). Instead, I get silence.

 

Any ideas?

 

Thanks,

 

Darryl

Edited by darryl1970
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...