Jump to content
  • entries
    338
  • comments
    905
  • views
    259,665

About this blog

Geeky things I'm up to

Entries in this blog

cog coding

I've been doing a bunch of think-coding over on potatohead's Blog trying to work though making Propeller code capable of generating a 240x240 resolution sprite display.   For those not familiar with the Propeller, it's an 8-way SMP processor in a very low cost ($13 each) package. Each processor (or cog) has 496x32 bits of RAM which functions as registers and code & data storage (self modifying code is almost required), with 32K of shared RAM accessed in round-robin fashion (very determini

EricBall

EricBall

TIA percussion question

I've been toying with an idea for a 2600/7800 TIA music player for a while. The design point is to minimize the space required, near 1 byte per note. A single byte would contain both frequency and period (4 possible). Plus, there's 34 codes for notes which would be played for a single frame for percussion sounds.   Anyway, I'm wondering if anyone has a suggestion for AUDC/AUDF values for the single frame codes. e.g. AUDC = 8 AUDF = 0 high hat AUDC = 8 AUDF = 8 snare AUDC = 15 AUDF =6 s

EricBall

EricBall

7800 music app idea

One of the classic complaints against the 7800 is it uses the 2600's TIA for sound. Maybe that could be used as an advantage.   Imagine a TIA music editor which uses the 7800's graphical capabilities to display notes on a scale and to scroll in realtime during playback.   My only question is how to get compositions out of the 7800 and back to a PC so the creations could be added to 2600/7800 homebrews. Maybe via a SaveKey <-> serial interface?

EricBall

EricBall

7800 cycle counting

I've done some cycle counting of the display list builder for SpaceWar! 7800 and the results aren't pretty:   103 cycles per display list (25 NTSC, 30 PAL) 403 cycles per player sprite, +191 for horizontal wrap around 248 cycles per non-player sprite, +82 for horizontal wrap around 50 cycles per sprite header vertical wrap around 200+ cycles of overhead   At 114 cycles per raster, just the display list builder is going to chew through all 62 lines of VBLANK.   So, what to do? 1. Optim

EricBall

EricBall

Houston, we have lift off

I did a quick merge of the rest of the 4K SpaceWar! 7800 code so now the ships move & fire again. Of course there were problems - the main one being top-to-bottom wrap around. Turns out there was a bug in the 4K version, it didn't handle it properly either. Although the code wrapped around the display list pointers correctly, it didn't handle the end of display list index correctly. Thus, it tried to add the sprite to display list 0 using index 25, wiping out the display list. Ick!  

EricBall

EricBall

stationary sprites, scrolling background

I've merged in the initialization and display list builder code from 4K SpaceWar! 7800 and made the necessary tweaks to handle the moving zones. Fun! My main problem with this code was I kept running out of ZP RAM, which would push a (ZP),Y pointer variable to $FF, which doesn't work at all.   I first ran into the problem when I put in the initialization code and tweaked the display list initialization (so the constant parts of the tile headers only get written once). Kaboom! So I dragge

EricBall

EricBall

vertical scrolling

After much banging my head against the wall, I finally got the background scrolling smoothly. A lot of the problem was I couldn't keep straight which way was up. The next challenge is to integrate the code from 4K SpaceWar! 7800 and revising the display list builder to compensate for the moving background.

EricBall

EricBall

vertical motion

The starfield now move up and down, following the sine wave, though in 8 line jumps. Smooth scrolling is next, but that requires some display list & display list list magic.   I've also started using a 6502 simulator for general debugging. Since a lot of 7800 code is data movement, it's reasonable to use a general 6502 simulator. I caught a couple of bugs this way. The biggest problem is the built-in assembler isn't DASM compatible and isn't as capable.   I've also made some major im

EricBall

EricBall

side scrolling star field

That was both easier & harder than I expected. The hard part was the usual lack of debugging tools on the 7800. The easy was more a reflection of how my 6502 coding skills have improved over time.   Next challenge is to put in the Y & SINE routines. I also need to do some cycle counting and figure out how much CPU time the background starfield will eat. I'd really like to be able to recalculate everything every frame, but I have a sneaking suspicion I might need to interleave backg

EricBall

EricBall

32K SpaceWar! 7800

Current status - static starfield complete (NTSC version)   The next big step is turning the Star X,Y into DLL & DL entries and going to a dynamically built DLLs (one for on grid i.e. StarY&7=0) instead of the static DLL & DLs. Once that's done, I'll need to integrate the 4K SpaceWar! 7800 sprite to DL routine.   Sorry if this is a little dense and cryptic. It's mostly for me to remind me of the design decisions which I've made (or remade).   Reviewed old blog entries, found

EricBall

EricBall

Flee the flea

Saturday my wife declared she had suffered enough cabin fever and declared we were heading out, preferably to a flea market in the area. She was looking for Premier League jerseys (ideally an authentic Joe Cole Chelsea blue), but I was keeping my eyes peeled for stuff to add to my Nintendo collection (although I've given it up for Lent, 'cause she convinced my son to do the same). I think I saw two booths with used games and premium prices. My target price these days is C$10 so seeing stuff t

EricBall

EricBall

6502 sinewave

Since I can't find my Leprechaun round tuit, I've told myself I have to work on SpaceWar! 7800 some more. One of the features I really want to add to SW78 is the starfield background (Expensive Planetarium). But the tile map is much larger than the screen, thus it needs to move in some way to show the whole thing. My original idea was to make the movement based on the spaceships wrapping around; they'd kinda drag the starfield with them. The disadvantage with this idea is there are two ships

EricBall

EricBall

GCN Wind Waker - second impressions

Okay, I'm part way through Wind Waker; the pirate has become Zelda and I need to ride the waterspout to get my fire & ice arrows. Of course, I don't know how many side plots I need to follow up on, so there's probably a bunch of random sailing left.   Which brings up two points. First, a lot of the reviews really focused on how tedious they found the sailing & wind changing. I disagree. Yes, you're going to spend a lot of time sailing around (often criss-crossing the entire map), b

EricBall

EricBall

GCN First Impressions of Zelda: Wind Waker

One of the things my mother-in-law brought with her was her copy of Wind Waker. Last night I sat down for an hour or so and played through the intro island. I really enjoyed playing both N64 Zeldas (though I prefer Occarina to Majora) and my hands instantly "remembered" the controls; pressing R to shift the camera and still pressing A to jump :-).   The big change from the N64 Zeldas is, of course, the cell-shaded style graphics. My first thoughts were "ick, ugh, how annoying and distractin

EricBall

EricBall

nope, no round tuit here

Well, I haven't touched Leprechaun in over a month. I thought I might find the time over the holidays, but the drive simply wasn't there. Sigh   Big news on the home front is my mother in law is in town 'cause my wife had jaw surgery to fix her overbite. She's not wired shut, but she is swollen and on a liquid diet. I don't think either of us were prepared for the full impact. Ah, well; it's a temporary thing.   My son is having fun playing New Super Mario Bros on his DS, although I thi

EricBall

EricBall

Nintendo DS - first impressions

My son got a DS lite as an early Christmas present (to play with on the plane). We also gave him "Super Mario 64 DS" and "New Super Mario Bros.", along with the GBA version of Activision Anthology which I happen to have...   I have to say I'm amazed that the DS is able to do justice to SM64 from a graphics perspective. It really says what kind of 3D power it has under the hood. NSMB also has 3D graphics, but more in the Donkey Kong Country style - but rendered in real time instead of pre-re

EricBall

EricBall

GCN Pikmin (completed) / Pikmin 2

Got both of these cheap when the local video store closed, along with WarioWare.   Just some final thoughs on Pikmin now that I've finished the game; although I ended up restarting from the beginning when I realized I was too far behind to get all of the parts in 30 days. And I guess that's my main complaint with Pikmin: the 30 day time limit is "un-fun". The time limit on each day isn't bad (except for the final boss), but it's disheartening to realize you're at day 20 with 15 parts still t

EricBall

EricBall

Apple ][ Disk ][ Read Sequencer

One of Woz's design decisions for the Disk ][ was to force the MSB of each byte read to be 1. Although this restricted the number of values each byte could take, this was already restricted by the number of sequential zero bits i.e the time between changes in magnetic field; initally 1 (DOS 3.2), later 2 (DOS 3.3). But the restriction on the MSB had several positive side effects: 1. The MSB could be used as an easy "data ready" flag by the CPU. 2. The read sequencer could hold the completed

EricBall

EricBall

more Disk ][ musings

As I mentioned in my previous entry, I've been taking a deep look at the Apple ][ Disk ][ controller. IMHO it's an elegant blend of hardware, software & firmware.   The crux of the controller is the P6 (8bitx8bit) PROM which describes the state machine along with an 8 bit shift register and a 4 bit state register.   The CPU selects one of four modes via two PROM address bits (called Q7 Q6): 00 read a byte 01 sense write protect 10 write byte 11 load byte for write   The other 2 ad

EricBall

EricBall

more Apple ][ musings

My latest distraction is the Apple ][ disk. I'm sure some of you, like me, remember the golden age of copy protection & cracking which happened around the Apple ][. Much of that was because the A2 was largely software driven. (Another Woz brilliant lunancy cost-cutting effort like A2 graphics.)   Unfortunately, because the A2 was pre-Internet, there isn't a lot of surviving detailed documentation on the web. The one piece I'm missing is a detailed description of how the bits get writte

EricBall

EricBall

Nintendo DS for Christmas

My six year-old son's Christmas wishlist has GameBoy on it. After some thought I realized we have enough ways to play video games around the house that adding another won't be encouraging him to play more. Plus the battery connector on the portable DVD player died (really bad design IMHO - two very small spring steel "fingers" just waiting to get bent out of shape) and we have a 5+ hour plane flight coming up.   Although the DS doesn't have GB/GBC compatibility, it's the current platform so

EricBall

EricBall

advanced un-bankswitching idea

One thing I find amazing about the 2600 homebrew scene is the strong interest in creating new bankswitching hardware, often with advanced capabilities. I think, very soon, the only remaining VCS limitations will be the capabilities of the TIA and that there are only 76 CPU cycles per line to update the TIA (hmm... shades of the GTIA/ANTIC).   Anyway, one idea which occurred to me is whether it would be possible for the cartridge to automatically bankswitch the 64K (32K usable) address space.

EricBall

EricBall

look-ahead bug fixed

lep20061108.zip Okay, I've fixed the look-ahead bug which was causing the ladder issues vdub_bobby was noticing. I think you'll find the leprechauns to be a little smarter now. Leprechaun Level Editor updates as usual.   Oh, one note. The AI for swinging on ropes is the same as running with the one exception of falling when the player is directly below. (Note - it may be possible to run under a leprechaun and not trigger this behaviour.) So when the player is higher than the lepre

EricBall

EricBall

One bug fixed, one needs some thought

Thanks to vdub_bobby, I'm making progress.   Okay, I've fixed the problem with the leprechauns getting stuck. (I had a BPL in the en_stop routine where I shoulda had a BMI. So hunt mode wasn't working right. There may have also been an error in the "rotate joystick" lookup tables.) I'll update the Leprechaun Level Editor shortly (check the date).   The problem with the ladders is a little trickier. It has more to do with the lookahead routines and that I'm using the same one for both th

EricBall

EricBall

tweak, tweak, tweak

Minor update from yesterday. The leprechauns now try to go towards the player when they stop before they go into hunt mode. (Which should help vdub_bobby's switchback level.) They also should drop off the ends of ropes when stopped.   I also flip-flopped on the drop-off detection, though I'm not certain whether I like it. The Leprechauns now turn around and go into hunt mode when the player is above them and they encounter a drop-off. Unfortunately, with my built-in level this causes them

EricBall

EricBall

×
×
  • Create New...