A.D.A. Amiga Demoscene Archive

  Welcome guest! Please register a new account or log in

  

  

  

Demos Amiga Demoscene Archive Forum / Coding / 4k intros - whether it is fair?

 

Author Message
lvd
Member
#1 - Posted: 16 Jun 2007 15:23
Reply Quote
subj:
- to use WriteChunkyPixels() instead of custom C2P?
- to use standard system fonts (those on OS3.1 distrib floppies) instead of custom ones?
Blueberry
Member
#2 - Posted: 16 Jun 2007 20:27
Reply Quote
- to use WriteChunkyPixels() instead of custom C2P?

Sure, it is part of the ROM, although people with only kickstart 3.0 might be disappointed that they are not able to see your intro. But if you don't care about that, and is satisfied with your effect running about 2 fps (if you are lucky), go ahead! ;)

A simple (add/addx) c2p really isn't very big (I'd say around 50 bytes packed) and will be much, much faster than WriteChunkyPixels.

- to use standard system fonts (those on OS3.1 distrib floppies) instead of custom ones?

Depends on the compo rules and your intended audience. If the compo rules state that a complete Workbench installation is available, it should be fine. And there will be no problems with people who have thoroughly set up Amigas or emulators. But I think there are a bunch of people out there that just have a minimal emulator setup and watch demos on that. Then again, I might be completely wrong here.

Fair? Sure. Just using the font data can be tricky enough. Topaz 8 has a simpler (undocumented) structure which makes it easy to use, and it is indeed used in lots of 4k intros out there.

This discussion ought to be in the coding section, right? Is there any way to move a thread from one forum to another?
z5_
Member
#3 - Posted: 16 Jun 2007 20:30
Reply Quote
@blueberry: moved it to coding
winden
Member
#4 - Posted: 16 Jun 2007 21:14 - Edited
Reply Quote
I once did c2p which needed only around 256bytes unpacked (important for 030 cache) while remaining very fast by just reusing the code for upper 4 planes and lower 4 planes... sort of a inner 4bpl c2p and a outer double routine which called the inner 2 times.

BTW, it would be a cool project to finally implement a fast c2p and hook it so that it gets used by WriteChunkyPixels(), WritePixelArray() and WritePixelLine(). blazeWCP seems to do that
doom
Member
#5 - Posted: 16 Jun 2007 21:37
Reply Quote
There are several patches that do the same thing IIRC.
lvd
Member
#6 - Posted: 17 Jun 2007 15:10
Reply Quote
It is implied, to recommend WCP-speeduppers, when using WCP =)

Font as I remember not so hard to extract - first extract letter info (displacement and width in bits), then cut it off using BFEXTU...


It there then any c2p-bank? ;) I feel it's waste of time creating any new c2p =)
Blueberry
Member
#7 - Posted: 18 Jun 2007 08:44
Reply Quote
Right, if you use BFEXTU for reading and BFINS for drawing it isn't that bad. These are a bit slow, but the chip ram access is probably going to be the limiting factor anyway.

WCP speedup patches are good if you use WCP. But it would be foolish to rely on those for intros.

For c2p sources, visit http://membres.lycos.fr/amycoders/ - at least until someone gets around to moving all those resources over to ACA. :)

None of them are particularly size optimized though.

For a very small (and something like 60% of copyspeed) c2p, do like this:

move.l (a0)+,d0 ; Read chunky data
add.l d0,d0 ; Bitplane 7 bit in X flag
addx.l d7,d7 ; Into bitplane 7 register
add.l d0,d0 ; Bitplane 6 bit in X flag
addx.l d6,d6 ; Into bitplane 6 register
...

and so on, until you have filled in 32 bits of each bitplane. Then write these to chipmem. Extending this to 8 bitplanes is left as an exercise to the reader. ;)
lvd
Member
#8 - Posted: 18 Jun 2007 22:13 - Edited
Reply Quote
For c2p sources, visit http://membres.lycos.fr/amycoders/
10x! =)


add.l d0,d0 ; Bitplane 7 bit in X flag
addx.l d7,d7 ; Into bitplane 7 register
add.l d0,d0 ; Bitplane 6 bit in X flag
addx.l d6,d6 ; Into bitplane 6 register


hehe! I had done similar c2p once, never thoght it could be any usable :) But, it seems to be short alternative to WCP :)
noname
Member
#9 - Posted: 18 Jun 2007 23:34
Reply Quote
For more C2P get this.

It is an archive of Kalms' C2P from 1997 which I received back then. I added my no-system blitter-queue handler to the pack and archived everthing since I couldn't find these routines on the net within a reasonable time-frame.

Kalms: I assume it is okay to release these routines, but tell me if not.
StingRay
Member
#10 - Posted: 19 Jun 2007 17:44
Reply Quote
subj:
- to use WriteChunkyPixels() instead of custom C2P?
- to use standard system fonts (those on OS3.1 distrib floppies) instead of custom ones?


I say it's utterly lame to drop custom c2p only to save a few bytes! In my 4k startup, I support WriteChunkyPixels and c2p and it's still pretty small. Same for Fonts, the only exception here is topaz that is in ROM but using fonts from disk is as lame as dropping c2p! Just my 2 cents. :)
sp_
Member
#11 - Posted: 28 Jun 2007 14:31 - Edited
Reply Quote
Here is a version of my pipelined addx c2p first presented in one of loaderrors 4k's. The innerloop should be unrolled to gain spead because the cruncher will pack good.

;6bpl c2p for 4k intros. V0.5
;Big screens supported(1280*256)++ (if interleaved bitmap is used)
;Pipelined but not copyspeed.
;Coded by sp^ctz (Rune Stensland) 04.11.2002
;sp@kvarteret.uib.no
;92 bytes. a0 pointer to chunky buffer a1 pointer to bitplane.

C2P0604K:
move.l a5,-(sp)
move.l #WIDTH*HEIGHT/(4*8),-(sp) ;6

subq.l #2,sp
.loop3:

;tst.w (a0) ;preload cacheline ;2
move.w #8,(sp) ;4

.loop2:
move.l d7,d0
lsr.l #1,d0
eor.l d0,d7
and.l #$EEEEEEEE,d7
eor.l d0,d7

move.l (a0)+,d0 ;32bit

cmp.w #3,(sp)
blt.s .nei

move.l d7,(a1) ;2
.nei
REPT 3
lsl.l #3,d0
addx.l d1,d1
add.l d0,d0
addx.l d2,d2
add.l d0,d0
addx.l d3,d3
add.l d0,d0
addx.l d4,d4
add.l d0,d0
addx.l d5,d5
add.l d0,d0
addx.l d6,d6
ENDR

add.l d1,d1
move.l a2,d7 ;10
add.l d2,d2
move.l a3,a2
add.l d3,d3
move.l a4,a3
add.l d4,d4
move.l a5,a4
add.l d5,d5
move.l a6,a5
add.l d6,d6

add.l #WIDTH*HEIGHT/8,a1 ;4

subq.w #1,(sp) ;4
bne.s .loop2

sub.l #WIDTH*HEIGHT-4,a1 ;6

move.l d6,d7
move.l d5,a2
move.l d4,a3 ;10
move.l d3,a4
move.l d2,a5
move.l d1,a6

subq.l #1,2(sp) ;6
bne.w .loop3

addq.l #6,sp ;2
move.l (sp)+,a5

rts ;2

 

  Please register a new account or log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0