Archive for February, 2012

new tg16/pce assembler

Posted in Uncategorized on February 6, 2012 by pcedev

Or rather, a new build of PCEAS with changes. MooZ and I were working on doing changes to the assembler, sine some changes were needed for specific code layouts. I was gonna wait and just do a joint release with MooZ last year, but I guess things got slow on his side. So I’m just releasing it here. There’s a readme and a commented ASM test file, but I’ll just relist the new features here.

There’s a new data define directive; .dwl and .dwh. They return the LSB (.dwl) and MSB (.dwh) of a word entry. This useful for building a split lsb/msb tables. But more important, it cuts down the amount of typing needed for creating arrays of function tables of.. function addresses. Normally, you can just handle binary data in split format with external apps and just include the new binary data. But working with specific and runtime address generated labels for tables gets tedious. So this helps. Just copy/paste the same table and change the directive to .dwh for the second split set.

Macro’s now how a new legal character for macro names. Doesn’t sound a like a big deal, but ADDW.b or MOVE.b/MOVE.w/MOVE.l looks cleaner and much nicer than using an underscore _ or such.

Local labels how have -/+ support… sort of. You still need the ‘.’ character to signify/define a local label name, but now you can use .- or .– and .+ and .++ etc. You can use them in higher level math/logic operations too and inside EQUATE defines. You just need whitespace between the end of the name and the – or + operator, *IF* your label ends with a – or +. So test = .+++ + $10 works fine, but so does test1 = .skip+$10. The new labels for local doesn’t not break backwards compatibility with otherwise normal label names. I’m not a big fan of the -/+ usage as it can messy looking real quick in my opinion. But couple of people had requested it. Plus, it would make converting some c64 or such code a little easier (I mean, for when you’re lazy).

Opcodes that cross 8k bank boundaries no longer create an error and stop assembling. That is to say, if one or more opcode’s byte cross that boundary. Now it will generate a warning instead, but assemble correctly. Labels logic works fine with this as well. This means you can make 16k or 24k or whatever size ‘code banks’. This is needed for some hacking related stuff since those commercial assemblers didn’t have this problem/issue (like Bonk for instance). This also applies to data defines as well.

And finally, I fixed a bug where if the assembler encountered a certain error – it would just crash (there was no exit handler).

You can download the new version in Download and Links section.

Note: Things I like about PCEAS assembler syntax that I wouldn’t change; [] instead of () for indirect addressing. Who cares if almost all the original 65x assemblers used (), [] just makes things sooo much easier for the parser and avoid *certain* high level logic bugs (misinterpreted bracketing for opcodes). And < for non indirect ZP addressing. Though what I would like to add in the future is <# and >#for shorthand #low() and #high() directives, which have nothing to do with ZP addressing.

Advertisements

R-Type 2 demo

Posted in Uncategorized on February 6, 2012 by pcedev

I started this back in 2008, as a WIP for a shmup engine. I never did get very far into it; no collision map (at least applied in game), no other enemy objects. Anyway, using the assets to have something for my new engine, made me think why not just release it as is; source and rom. Mind you, it’s nothing special at all. But whatever, it’s fun to look at. Note: That second layer that scrolls on the arcade version, is setup for dynamic tiles (15×15 tile image). I thought I had a demo with the dynamic tile scrolling working in game, but I couldn’t find it from the back up stuff/drive. The tiles are setup for it, but the pre-shifted/rendered tile set for it isn’t in the build itself (although I have them as assets in other folders). First boss was done too, but this demo doesn’t load that section either. I don’t plan on updating the source for it, just releasing it as is – with some removal of obsolete comments and such. Too bad I didn’t put the time into this years back. It would have made a pretty cool single level+boss demo.

Here’s the demo (rom and source): Download and links section

Game engine news

Posted in WIP Game 2012 on February 4, 2012 by pcedev

Heh, game engine logic is coming along nicely. Even if I just put 1-2 hours a day on working on it, I’ll be getting through this in no time (relatively speaking). Making it a must-do schedule, a second job so to speak.

 I wanted to show off some stuff soon, but all I have is R-Type 2 assets (converted for PCE) that I was using a long time ago to demo out a game engine. I don’t think it would be appropriate to demo the existing engine with those. I’ll see if I can make something up one of these days to use in place of (though it won’t look as cool as the assets I have now, shame).

Anyway, the script engine is coming along nicely. Right now it calls specific tasks (immediate task) and such for certain parts of the stage, but I started working out the logic for function list calling. Functions that run or serve as a background process over multiple frames. Basically a dynamic function pointer array (an array with function pointers, and the list is dynamically increased or decreased. Although the higher level array is just index numbers by themselves, in which they point to specific function pointers. Just faster to dynamically move around/sort bytes instead of words). There’s probably a name for it in higher levels languages (and I’ve done it manually in C), but I don’t know what it’s called. So, these functions would serve a purpose that an immediate request could not handle, as well as assigning multiple function requests that run as background processes in parallel of each other. I.e. game logic stuffs.