Prev: what happened CBM=VGA
Next: 1581 Drive Kits on eBay
From: Pasi Ojala on 19 May 2006 05:45 On 2006-05-19, John Selck <gpjiweg(a)t-online.de> wrote: > Yes true your routine is faster, but it does not do any Bresenham > interpolation. Neither did yours. It was just a small part of the actual routine so that you could quote such a large improvement, right?:-) At least I think that my routine was equivalent as long as $0+1 and X are setup the same way. -Pasi -- "There's only one thing more dangerous than Mr. Garibaldi when he's loud. .. It's when he's dead silent." -- Sheridan to Lochley in Babylon 5:"Phoenix Rising"
From: Pasi Ojala on 19 May 2006 06:56 On 2006-05-19, John Selck <gpjiweg(a)t-online.de> wrote: > Bla bla yeah whatever. You forgot the INX, it's not my fault so > don't try to make it my fault. Bla bla, thans for pointing that out. Mixed Y and X there. The fixed inner loop version is even faster: yidx: STX $FE00 SBC $10 BCS .skip ADC $11 INX ..skip: whereever Y is changed, do it to yidx+1 Best case 10 vs 11 for using invalids, worst case 14 vs 15 for using invalids. This shows that the inner loop that uses invalids is slower! Also, in your routine the target buffer must be at $fe00 or the routine does not work. If you had the zero page free (music routines tend to use ZP), you could change SHX $fe00,y to STX $00,y and save a cycle. Now do you see that inner loop alone does not say anything about the speed of the routine? It is like arguing that lax #16 is 100% faster than lda #16 ldx #16 -Pasi -- "There's only one thing more dangerous than Mr. Garibaldi when he's loud. .. It's when he's dead silent." -- Sheridan to Lochley in Babylon 5:"Phoenix Rising"
From: John Selck on 19 May 2006 08:23 Am 19.05.2006, 12:56 Uhr, schrieb Pasi Ojala <albert(a)pikkukorppi.cs.tut.fi>: > On 2006-05-19, John Selck <gpjiweg(a)t-online.de> wrote: >> Bla bla yeah whatever. You forgot the INX, it's not my fault so >> don't try to make it my fault. > > Bla bla, thans for pointing that out. Mixed Y and X there. > The fixed inner loop version is even faster: > > yidx: STX $FE00 > SBC $10 > BCS .skip > ADC $11 > INX > .skip: > > whereever Y is changed, do it to yidx+1 ??? What are you trying to do with such a routine? The ,Y is there for multiple reasons: You can loop the whole code easily without "INC yidx". Ok, you need INY or DEY but you need that for the loop anyway. Another reason would be unrolled code where you try to save memory, for example: have one interpolation buffer at $FE00-$FE7F and the second one at $FE80-$FEFF (for left/right edges of a vector surface maybe). Or even better you could do partly unrolled code, like having the Bresenham iteration 8 times unrolled, and then loop it. This combines the speed gain of loop unrolling with the memory saving of a loop. > Now do you see that inner loop alone does not say anything > about the speed of the routine? > > It is like arguing that > lax #16 > is 100% faster than > lda #16 > ldx #16 We don't need to argue about this, because LAX #immediate is one of the unstable opcodes and should not be used as LDA/LDX replacement. Anyway, this whole discussion went way off: The Bresenham example was just one example where you could use an opcode. And SHX/SHY are really useful opcodes, since you can use them as STX abs,Y/STY abs,X which the normal 6502 does not have (sadly). There are other example of illegal usage, one where really many different illegals are used and it's absolutely impossible to do it without the illegals is the "6 sprites over FLI" code.
From: heuser.marcus on 19 May 2006 09:45 >> The 6502 was already a much less expensive processor than its >> competitors, because of a mask retouching technique MOS Technology >> developed that saved mask iterations. > > I saw that claim on Wikipedia. Is there any published reference? There is book about the history of Commodore which is rather detailed (and entertaining) about the MOS history, too: http://www.commodorebook.com The MOS chapter can be read freely here: http://www.commodorebook.com/view.php?content=toc Excerpt: At MOS Technology, John Pavinen pioneered a new way to fabricate microprocessors. "They were one of the first companies to use non-contact mask liners," says Peddle. "At that time everybody was using contact masks." With non-contact masks, the metal die did not touch the wafer. Once the engineers worked out all the flaws in the mask, it would last indefinitely. --- I guess, Chuck Peddle is a good enough reference ;-) bye Marcus
From: heuser.marcus on 19 May 2006 09:49
> Some hungarian maniacs have reverse engineered the 6502: > > http://impulzus.sch.bme.hu/6502/6502/ > > Sadly the site is in hungarian language, but atleast the logic diagrams > speak for themselves. Maniacs indeed! Thanks for the link, John! Now - does anybody know something equivalent for the Z80? [ducks] bye Marcus |