[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DGR...



On Thursday, November 15, 2012 1:13:01 AM UTC-6, Steve Nickolas wrote:
> On Wed, 14 Nov 2012, BLuRry wrote:
> 
> 
> 
> > I found the rom firmware routines to be useful for general purpose but 
> 
> > they're mostly optimized for size and are somewhat a tradeoff of 
> 
> > speed/efficiency compared to a bulkier routine using a lookup table to 
> 
> > translate the y-coordinate to a memory offset.  So if you're trying to 
> 
> > do a really fast drawing routine (say, a full-screen plasma effect) 
> 
> > you'll have to roll your own or look @ other sources for examples to get 
> 
> > the most speed.
> 
> 
> 
> Well, using C already sacrifices speed and size, though not as severely as 
> 
> using BASIC.  The description of what I needed to do to do what I wanted 
> 
> made my head explode when trying to write it in asm from the beginning, so 
> 
> I started on a PC, writing for DOS, with the mindset that I wanted to get 
> 
> it onto the Apple as soon as possible after it was up and running on DOS.
> 
> 
> 
> OK, I'll open the bag.  A friend suggested I try to write a CHIP-8 
> 
> interpreter.  Its native resolution, 64x32, is better matched by DGR than 
> 
> any other video mode the Apple ][ series supports.
> 
> 
> 
> -uso.

Nifty!  Well, the only way to draw is via the DXYN opcode and screen memory is otherwise not accessible.  That could be rather handy since you only have to optimize one screen access method (and the clear screen opcode can be a simple rom call).

It makes sense to do a first pass which just plots using rom calls, but since you can impose a lot of constraints, such as B&W only, you can go back and optimize a lot of things to make your own quick draw routine which draws two pixels at once and so on.  It would be a better use of time to focus on the main loop and less time worrying about all the specifics like sound (though timers will be a big deal... you could use the //c and //gs VBL interrupts but for the //e you'd have to poll the VBL in your main loop.)

-B