Jump to content
IGNORED

Berzerk for 7800


Yurkie

Recommended Posts

I think it would be if you used the "pokey" chip! That's how the 5200 did it!

That's how the 5200 did it because POKEY is the 5200's sound chip. It's not like it had a choice in the matter.

 

Digital audio is perfectly doable on the TIA, as demonstrated by Jinks, Quadrun, Berzerk, etc.

  • Like 1
Link to comment
Share on other sites

Does the game have to pause when voice is played, that is the main issue IMO. If it does pause using TIA, would the pause issue be taken away using a Pokey.

 

Some of my very favorite old school games are on the 7800 and Berzerk is one that isn't. I was hoping perhaps someone might choose to program it, if it will do speech during game play. Comments by kenfused and Pacmanplus would be fantastic.

Link to comment
Share on other sites

There is no game play during sample playback in some 2600 games because there are no interrupts available, so the display code also needs to bash the audio registers... If the game display is too complex then the only option is to switch to a simpler non-game display for the sample playback. Shouldn't be an issue on the 7800.

 

On the other hand, TIA provides 4-bit sample playback or ~5-bit if you combine channels. How many bits can pokey provide for sample playback?

Link to comment
Share on other sites

Does the game have to pause when voice is played, that is the main issue IMO. If it does pause using TIA, would the pause issue be taken away using a Pokey.

 

Some of my very favorite old school games are on the 7800 and Berzerk is one that isn't. I was hoping perhaps someone might choose to program it, if it will do speech during game play. Comments by kenfused and Pacmanplus would be fantastic.

Well I think PMP was working on Frantic and the screenshots looked great. IMO frantic way way better..Hes doing Bently bear as well which is tottaly awesome!! So a very busy guy!! And fn awesome as well!!

Link to comment
Share on other sites

A Timer IRQ is the easiest way to provide simultaneous sample playback on the A8 computer.

 

It seems the 7800 doesn't receive IRQs from the RIOT, but if a Pokey cart is used with IRQ connected, then that would work.

 

The easier alternative to timer IRQs is using DLIs every 4 scanlines then having the last DLI doing the VBlank processing which has sample playback interleaved periodically (slightly messy).

 

Another alternative it to have some of the sample playback interleaved within the main program loop. The bottom/top DLIs can set/clear a flag to indicate when this is needed.

 

One problem with the DLI every 4 scanline situation is that can mess with your overall graphics architecture. An alternative there could be DLI each 8 scanlines, which does <play sample> <wait 4 scanlines> <play next sample>

Link to comment
Share on other sites

It seems the 7800 doesn't receive IRQs from the RIOT, but if a Pokey cart is used with IRQ connected, then that would work.

 

Using external POKEY IRQs during active display time to play sample data introduces artefacts into the audio because the time between consecutive samples being played becomes a variable. The time delta ultimately depends on how much "work" MARIA is doing per zone so its best avoided in my opinion.

 

The best option is to use DLIs in the active region. However, if you are using programmer tricks e.g. changing colours or horizontal resolution on the fly then this method may also be problematic. If you aren't doing programmer tricks very often (typically once or twice per frame) it doesn't affect the audio too badly.

 

Dividing your game's playfield into 4 pixel high zones to get a DLI per zone will add a great deal of complexity to your sprite cutting routine that places parts of sprites into zones. Thus the maximum number of sprites per frame that can be handled by the game will be reduced. The other downside is that your game screen's DLL and DL area will consume much more RAM leaving less for the game itself.

 

Like Rybags suggested I'd also recommend keeping the playfield zones normal height and doing "sta WSYNC" between sample depack and playback.

Link to comment
Share on other sites

Some jitter in samples is acceptable, but Pokey Timers are cycle accurate so timing can be done to keep to low DMA areas or offscreen.

 

Another idea could be to run 2 Timers at same frequency with slight offsets. Use the first to trigger the IRQ which then prepares the sample and plays it back once the second timer has triggered.

Link to comment
Share on other sites

Some jitter in samples is acceptable, but Pokey Timers are cycle accurate so timing can be done to keep to low DMA areas or offscreen.

 

The jitter can be quite bad. For example :-

 

Lets say the Berzerk maze is done in indirect mode at 2BPP (not the way I'd do it but its the simplest to get going). You wouldn't want to enable CWIDTH (double character mode) because the walls of the game are 4 pixels wide. So that means you have 40 bytes of map data and 40 bytes of graphics data split across two 5 byte DL headers.

 

MARIA cycles for the background = 2x10 + 40x3 + 40x3 = 260

 

With no sprites in that zone you'd have around 39 CPU cycles per scan line available.

 

With 10 sprites in a zone (which isn't hard to achieve when you have multiple robots, player shots, robot shots and the player to consider) you'd need :-

 

MARIA cycles for the sprites (at 2BPP, each 8 pixels wide) = 10 x (8 + (2 x 3)) = 140

 

So in that zone your available CPU cycles per scan line will drop to around 4!

 

The IRQ approach is best used in VBLANK in my opinion.

Link to comment
Share on other sites

This is all done completely with TIA (and a lot of storage space ... 4 megabit cart)

 

http://www.youtube.com/watch?v=iXmyDvftpd8

 

That's pretty slick. You should make one that plays the classic Atari jingle "Have you played Atari today?" :) What would be even cooler is if that could replace the Atari splash screen at the begging of a game cart. :)

  • Like 1
Link to comment
Share on other sites

That's pretty slick. You should make one that plays the classic Atari jingle "Have you played Atari today?" :) What would be even cooler is if that could replace the Atari splash screen at the begging of a game cart. :)

 

Nice idea but the 7800 BIOS ROM is small so there isn't enough room for any additional audio data without hacking up the 7800 motherboard. Large homebrew games could do anything they want after the signature check.

Link to comment
Share on other sites

  • 2 weeks later...

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