28 February 2010, 21:53 | #281 | ||
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
It can happen, but who cares, as long as it's solved. You know this already: I find that adding blank lines helps, because it's easier to miss things when your code doesn't contain those blanks. I may use them too often, but it seems you may not use them often enough. Just a thought
Quote:
Quote:
I haven't tested this, but if it is a lot better, then it might be nice as an option (especially for '060 users). What for? For one small, easy to miss bug? Of course, I believe software doesn't have to contain bugs, but to err is human, and getting rid of every last bug is not easy (although still possible). Last edited by Thorham; 02 March 2010 at 23:35. |
||
02 March 2010, 23:43 | #282 |
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
To add something to the super highres idea: You can do one of three things per pixel:
1) Write two ham pixels. 2) Write ham pixel, then palette pixel. 3) Write palette pixel, then ham pixel. Might be interesting as a quality enhancing feature. Also, you might want to try other weights then 2xRed, 3xGreen and 1xBlue. I've had some good results with 3xRed, 4xGreen and 2xBlue. Those weights take only a few extra cycles, but they increase the color quality. That green thing I told you about is reduced by those new weights (it's not caused by that bug), so it may be worth looking into. On a side note: Have you tried rendering without a palette? Now I know that this reduces the quality (duh ), but it's great for experimentation, because you get to see the errors pretty clearly. That said, most parts of most of the images I've tried still look very good without palette usage, and it makes me wonder what's really the best way to calculate when the error becomes too big. Edit: I've rendered the difference between a palette less ham image and the original 24 bit image, and the difference is quite interesting. It makes it really easy to see where the errors will be in the ham image. I've tried using this in my quick renderer, and for some images the quality is a little better than your quality renderer (really, I haven't made a mistake this time ). In most cases it's still not as good, however Damn, this is difficult, and frustrating Last edited by Thorham; 03 March 2010 at 23:21. |
04 March 2010, 15:41 | #283 | ||||||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Quote:
Quote:
Quote:
Now perhaps you need to know that '060 boards have even poorer chipmem timings than '030, and that displaying 8-bit SHRES leaves you with no free chip memory cycle at all (unless you're in the borders). Quote:
Quote:
Quote:
I chose the 3/2/1 ratio because it was used in the IJG jpeg library (see its jquant2.c). A "better" one would use non-integer values and 4/3/2 is certainly not better for the general case. Quote:
While debugging, I also tried to put ONLY palette pixels. Ugly, of course, but not always as bad as expected. Quote:
|
||||||||
05 March 2010, 13:33 | #284 | |||||||
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
Quote:
Quote:
Quote:
Don't be so hard on yourself, man, it happens. Yeah, good idea Quote:
Quote:
Quote:
Quote:
Update: I've come up with an interesting idea. Why not make a table for the palette/rgb deltas? Sure, you can only really make a table for 12 bit color (make one for 18 bit color and the table becomes way too large), but, you might be able to correct the errors (using fixed error correction already helps). I've been experimenting with this, and the table works, now all I need to do is correct the errors properly (those errors simply come from the fact that the assumed input pixel always uses only four bits per component). If this can be gotten to work properly, then you don't have to calculate two sets of deltas anymore, just one, and that should save a whole bunch of cycles (if the error correction can be made cheap enough without sacrificing quality in any way). Further gain may be obtained from using peterk's table idea with weighted deltas (haven't gotten this to work yet). However, the extra table will use up memory. My current version has V assemble to around 60 KB. Of course I'm doing Don Adan's lea thing again (which is a good idea, and if I can't get rid of it, too bad, I'm fresh out of registers. You'd think 15 free registers would be enough, but noooooo ), and my color lookup table currently isn't compressed like yours (I'm trying different palettes, with different color picking methods so there's no point in compressing the table yet), so those 60 Kbs will get a lot less. One last thing: In your quality renderer, can't you change one of the auto increment palette color reads (sub.b (a6)+,dx) to non auto increment? You then just have to add an addq to the palette writing part. Last edited by Thorham; 06 March 2010 at 22:28. |
|||||||
07 March 2010, 16:03 | #285 | |||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Quote:
Quote:
Quote:
Quote:
Quote:
Auto-increment has same speed as non auto increment. |
|||||
08 March 2010, 19:23 | #286 | |||||||||||||
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
I'm picking up the old discussion again right where I seemed to have left off.
Quote:
Absolutely. But that just means bugs happen, not that they can't all be removed (that's difficult, but not impossible). Yep, you sure do have to test monitors before shelling out the cash. Then I can't get more DM II info, sorry. Ah, so they didn't write it in assembler, eh? I wonder why not? Only when the dungeon is finished. I don't want to have to start over each time you add things Boring business software doesn't require any fancy graphics chipset nor does it need an amazing cpu architecture, so it's certainly no surprise peecees are the way they are. I've been thinking about it, but it's a lot of work, so I don't know... Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
From the jpeg source: Code:
* The 2/3/1 scale factors used here correspond loosely to the relative * weights of the colors in the NTSC grayscale equation. Quote:
Quote:
Quote:
Quote:
I thought it was a little slower. How strange... meynaf, you can save 100+ cycles per scan line by starting each line with a palette write. Doesn't help much, I know, but because this probably happens anyway it's still something To everyone who reads this thread: Does anyone have any good ideas to do fast, quality ham rendering? PeterK already provided a nice speed optimization, now a nice quality boost without much speed loss is needed. Any help and suggestions are appreciated Last edited by Thorham; 08 March 2010 at 23:04. |
|||||||||||||
11 March 2010, 12:29 | #287 | ||||||||||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Quote:
Quote:
Most code in the world isn't written in assembler. You could ask their writers why they didn't use asm Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
But original dungeon format can work with both my code and csbwin. Quote:
No. I fact I haven't tried yet Quote:
Quote:
Quote:
This was true for 68000 (I think). Even the leftmost pixel can be much better with ham pixels. |
||||||||||||
13 March 2010, 03:01 | #288 | ||||||||
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
Quote:
Depends on how you debug your program. It's only really a problem for situations where there are many cases to check. If you only have a limited set of cases for each routine, then you can be certain all bugs can be removed. Quote:
Quote:
Other platforms probably just screwed up, that's all, really. Some eh? Okay, the engine isn't too hard, not even when you take in account CSBWin and RTC. But then you basically have your own unique engine (which is actually a good thing), and you'd need some sort of dungeon converter, and that's the problem. Quote:
Quote:
I'm afraid so, too. Quote:
No, I didn't It's the right way to do it, because all users with custom planar screen setups will get best fit. Quote:
Quote:
Thought I read it in the docs for some reason. True, but if you set a color with the copper, you would get the best match, and it would save those few cycles |
||||||||
15 March 2010, 09:02 | #289 | |||||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Well, for an example, what do you get in the CCR after a divide by zero ?
Quote:
Quote:
Anyway I'm not about to touch it soon, so you can start it without worrying. Quote:
(But, of course, you must make the engine first...) Well, now you can press savagely on * key to activate the repeat mode you asked for (note this isn't a key combo ). As a bonus, you have a "MOD" indication shown whenever the file has been modified and not saved (things like that were badly missing). Archive has been updated but this time it is on my site : meynaf.free.fr/tmp/dm-tools.lzx English version is provided so you will not have to re-translate it Side note : I now remember another reason why I initially chose to do otherwise - to avoid blinking things due to constant display refresh as long as a button is pressed... But don't worry about this, it won't happen. First law of computing : things are always tougher than expected (and take longer, and cost more...). Quote:
Will you, one day ? Quote:
I only have PAL monitor driver, yet my first few tests (yes I've finally made some ) have shown cases where the suggested mode isn't the wished one (suggested one is logical, ok, but it's not what I wanted). For example, imagine you want a lowres screen that's larger than the view. Well, you simply can not do that with this method, which makes V's switches lowres and highres useless, and, even worse, prevent one of the OS bug workaround to work ! And is it really worth ? Mode promotion for dblpal works "as is", and very few monitors support highgfx - which means very few users, too. Quote:
Do you see what I mean ? Quote:
Anyway I've tried it, and I didn't see better colors at all. In fact what I saw was awful color details in frontiers between areas with very different colors (sometimes with rows of obviously wrong green or blue pixels). If you think I've made it wrong or checked "special case" images, then give me your code and images. But for me there is nothing better with this method. No, it's NOT better at preserving colors, in fact it's even worse. The errors are especially visible on texts. Strange, looking in the manual I see this isn't even true for 68000... If you read it in the docs, what did you read and where ? And the time you take to setup your copper list will eat the cycles (chipmem writes...), not to mention it's not easy as we're in an Intuition screen, and that it would totally prevent correct screen grabbing. All that, for just a few cycles and a minimalistic quality gain. Please think twice |
|||||||
15 March 2010, 15:13 | #290 | |||||||||||||
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
Quote:
Quote:
- A freed block connects to the start of another mem block. - A freed block connects to the end of another mem block. - A freed block connects to the start and the end of two other mem blocks. - A freed block doesn't connect to any other mem blocks. After that the memory has to be added to the FreeMemList: - Two entries are merged into one (freed block connects to two other blocks). - One entry is changed (freed block connects to one other block). - A new entry has to be added (freed block doesn't connect to other blocks). This last case has a few cases of it's own: - The new entry can just be added because there is room in the list. - The new entry can't be added yet because the list is full, the list can be expanded. - The new entry can't be added yet because the list is full, the list can't be expanded (out of memory). Now safety list space is used to allow the list to be expanded anyway. As you can see the number of cases is very limited, and this is for real code, not theoretical code. Quote:
Quote:
Quote:
Quote:
Nope, and it's a damned shame It's only because I'm strapped for cash right now. I've been made a good offer on the board, but I have to wait a little longer to get the money. Quote:
Quote:
Quote:
Quote:
Yes, I know this. A good example of when this is very obvious is when you look at things at very low light levels (night vision): You see in black and white or only get a very vague impression of color. Quote:
Code:
; transforme 1 ligne r,g,b en ham8 (chunky) ; a0=srcbuf, a1=dest, d7=nb pixels ifnd round round equ 0 endc ifnd quick quick equ 0 endc ifd halve ifne halve fail ; scaling not supported in this version endc endc mc68030 ifeq quick ; méthode normale ; d0 = tmp ; d1-d3 = set 1 ; d4-d6 = set 2 ; d7 = boucle ; a0 = src ; a1 = dest ; a2-a4 = save d1-d3 ; a5 = table ; a6 = palette ze_renderham8 suba.l a2,a2 ; an regs +rapides que pile suba.l a3,a3 ; (ceci est le pixel précédent) suba.l a4,a4 ; (1er à gauche = couleur 0, donc noir) ifeq round ; round=0 ou scale=1 moveq #0,d1 ; high reste à 0 tout le long moveq #0,d2 moveq #0,d3 endc move.l #zv_h8tab,a5 subq.w #1,d7 ; dbf + rapide que subq/bcc .loop ifne round moveq #2,d1 moveq #2,d2 moveq #2,d3 add.b (a0)+,d1 subx.b d4,d4 ; 00 si ok, FF si ça dépasse or.b d4,d1 ; inchangé si ok, FF si ça dépasse add.b (a0)+,d2 subx.b d4,d4 or.b d4,d2 add.b (a0)+,d3 subx.b d4,d4 or.b d4,d3 else ; round=0 ; pas d'arrondi, on coupe juste move.b (a0)+,d1 move.b (a0)+,d2 move.b (a0)+,d3 endc moveq #-4,d4 ; fc and.b d4,d1 and.b d4,d2 and.b d4,d3 move.l d1,d4 ; rrrr.... lsl.l #4,d4 ; rrrr....0000 move.b d2,d4 ; rrrrvvvv.... lsl.l #4,d4 ; rrrrvvvv....0000 move.b d3,d4 ; rrrrvvvvbbbb.... lsr.l #4,d4 ; rrrrvvvvbbbb move.l (a5,d4.l*4),a6 move.l d1,d0 sub.b (a6)+,d0 bcc.s .n0 neg.b d0 .n0 move.l d2,d5 sub.b (a6)+,d5 bcc.s .n1 neg.b d5 .n1 move.l d3,d6 sub.b (a6)+,d6 bcc.s .n2 neg.b d6 .n2 move.l d0,d4 ;Save Red. add.l d5,d0 ;Red+Green. add.l d5,d0 ;Red+2xGreen. add.l d6,d0 ;Red+2xGreen+Blue. add.l d0,d0 ;2xRed+4xGreen+2xBlue. add.l d4,d0 ;3xRed+4xGreen+2xBlue. ; add.l d5,d0 ; r+v ; add.l d0,d0 ; (r+v)*2 = 2r+2v ; add.l d5,d0 ; 2r+3v ; add.l d6,d0 ; 2r+3v+1b move.l d1,d4 sub.l a2,d4 bpl.s .n3 neg.l d4 .n3 ; add.l d4,d4 ; r *2 move.l d4,d5 ;3xRed. add.l d4,d4 add.l d5,d4 move.l d2,d5 sub.l a3,d5 bpl.s .n4 neg.l d5 .n4 ; move.l d5,d6 ; add.l d5,d5 ; add.l d6,d5 ; v *3 lsl.l #2,d5 ;4xGreen. move.l d3,d6 sub.l a4,d6 bpl.s .n5 neg.l d6 .n5 ; b *1 add.l d6,d6 ;2xBlue add.l d4,d5 ; d4=r d5=r+v d6=b add.l d6,d4 ; r+b r+v b add.l d6,d6 ; r+b r+v 2b add.l d5,d6 ; r+b r+v 2b+r+v beq.s .vbrb ; all together = 0 -> gbrb sub.l d4,d6 ; r+b r+v v+b ; d6=r d5=b d4=v d0=f cmp.l d4,d6 bls.s .br cmp.l d4,d5 bls.s .bx cmp.l d4,d0 bls.s .fi .ve move.l d2,a3 addq.b #3,d2 move.b d2,(a1)+ dbf d7,.loop rts .br cmp.l d6,d5 bls.s .bx cmp.l d6,d0 bls.s .fi .ro move.l d1,a2 addq.b #2,d1 move.b d1,(a1)+ dbf d7,.loop rts .bx cmp.l d5,d0 bls.s .fi .bl move.l d3,a4 addq.b #1,d3 move.b d3,(a1)+ dbf d7,.loop rts .fi move.b (a6),(a1)+ move.b -(a6),d3 move.b -(a6),d2 move.b -(a6),d1 move.l d1,a2 move.l d2,a3 move.l d3,a4 dbf d7,.loop rts .vbrb btst #0,d7 ; 0,2 -> b beq.s .bl btst #1,d7 ; 1 -> r beq.s .ro bra.s .ve ; 3 -> v (3210->vbrb) ; initialisation de la table ze_ham8init lea zv_h8tab,a1 lea zv_zz1(pc),a2 lea zv_zz2(pc),a3 lea 4096*4(a1),a4 moveq #0,d2 .re1 move.b (a3)+,d3 moveq #15,d4 and.b d3,d4 ; d4=low lsr.b #4,d3 ; d3=high bra.s .euh .re2 tst.b d4 bmi.s .re1 move.b d4,d3 st d4 .euh move.b (a2)+,d2 ; valeur à poser bclr #7,d2 beq.s .n7 addi.b #$20,d3 .n7 bclr #6,d2 beq.s .n6 addi.b #$10,d3 .n6 lea zv_pal32,a6 add.b d2,d2 ; max 63 -> max 126 add.b d2,d2 ; -> max 254 add.l d2,a6 .re3 move.l a6,(a1)+ subq.b #1,d3 ; comme dbf, mais high(d3) pas modifié bcc.s .re3 cmpa.l a4,a1 blo.s .re2 ; suite : palette modifiée lea zv_h8pal(pc),a0 lea zv_pal32,a1 moveq #0,d7 .loop move.b (a0)+,(a1)+ move.b (a0)+,(a1)+ move.b (a0)+,(a1)+ move.b d7,(a1)+ addq.b #4,d7 bne.s .loop rts ; données pour la table zv_zz1 incbin scrconv/zz1.dat zv_zz2 incbin scrconv/zz2.dat even ; palette zv_h8pal ; ma palette pour ham include scrconv/pal.i ; la méthode est rapide, par contre on dépense 16k de ram (pas énorme qd même) bss zv_pal32 ds.l 64 ; palette 4-bytes (4e=index*4) zv_h8tab ds.l 4096 ; indique index couleur +proche pour chaque 12-bit rvb code ; pour que l'appelant s'y retrouve else ; méthode rapide à palette fixe ze_renderham8 suba.l a2,a2 ; an regs +rapides que pile suba.l a3,a3 ; (ceci est le pixel précédent) suba.l a4,a4 ; (1er à gauche = couleur 0, donc noir) moveq #0,d1 ; high reste à 0 tout le long moveq #0,d2 moveq #0,d3 .loop move.b (a0)+,d1 move.b (a0)+,d2 move.b (a0)+,d3 ; diff d'avec pixel fixe (and c0 sur 3 composantes -> 64 cols) moveq #$3f,d0 and.l d1,d0 moveq #$3f,d5 and.l d2,d5 moveq #$3f,d6 and.l d3,d6 add.l d5,d0 ; r+v add.l d0,d0 ; (r+v)*2 = 2r+2v add.l d5,d0 ; 2r+3v add.l d6,d0 ; 2r+3v+1b ; trouver l'erreur sur chaque composante, d'avec le précédent move.l d1,d4 sub.l a2,d4 ; sur un 030, .l + rapide que .w pour An bpl.s .n3 ; (not taken : 4, taken : 6) neg.l d4 ; val abs de la diff .n3 move.l d2,d5 sub.l a3,d5 bpl.s .n4 neg.l d5 .n4 move.l d3,d6 sub.l a4,d6 bpl.s .n5 neg.l d6 .n5 ; pondérer les valeurs pour comparaisons ; ça se complique un peu parce qu'on n'a plus que d4-d6/a5 de libre add.l d4,d4 ; rouge *2 move.l d5,a5 add.l d5,d5 add.l a5,d5 ; vert *3 (et bleu *1) ; pour chaque composante, additionner l'erreur sur les deux autres ; je fais d6=d5+d6, a5=d4+d6 et d4=d4+d5 move.l d4,a5 add.l d6,a5 ; vert add.l d5,d6 ; rouge (plus besoin de d6) add.l d5,d4 ; bleu (plus besoin de d4-d5) ; prendre la solution qui a l'erreur la + faible ; (depuis d0=fixe, a5=rouge, d6=vert, d4=bleu) cmp.l a5,d6 ; 3 cmp avec vert bls.s .br cmp.l a5,d4 bls.s .bx cmp.l a5,d0 bls.s .fi ; fallthru : .ve moveq #-4,d0 ; fc and.l d0,d2 move.l d2,a3 addq.b #3,d2 move.b d2,(a1)+ subq.w #1,d7 bne .loop rts .br ; choix bleu/rouge cmp.l d6,d4 bls.s .bx cmp.l d6,d0 bls.s .fi ; fallthru : .ro moveq #-4,d0 ; fc and.l d0,d1 move.l d1,a2 addq.b #2,d1 move.b d1,(a1)+ subq.w #1,d7 bne .loop rts .bx cmp.l d4,d0 bls.s .fi ; fallthru : .bl moveq #-4,d0 ; fc and.l d0,d3 move.l d3,a4 addq.b #1,d3 move.b d3,(a1)+ subq.w #1,d7 bne .loop rts .fi ; fixe, c'est le cas le +rare moveq #-$40,d0 ; c0 and.b d0,d1 and.b d0,d2 and.b d0,d3 move.l d1,a2 ; pixel précédent move.l d2,a3 move.l d3,a4 lsr.b #2,d2 lsr.b #4,d3 or.b d2,d1 or.b d3,d1 move.b d1,(a1)+ subq.w #1,d7 bne .loop ze_ham8init ; pas besoin rts ; palette, arrondie à 3*2 bits rvb zv_h8pal dc.b $00,$00,$00 dc.b $00,$00,$40 dc.b $00,$00,$80 dc.b $00,$00,$c0 dc.b $00,$40,$00 dc.b $00,$40,$40 dc.b $00,$40,$80 dc.b $00,$40,$c0 dc.b $00,$80,$00 dc.b $00,$80,$40 dc.b $00,$80,$80 dc.b $00,$80,$c0 dc.b $00,$c0,$00 dc.b $00,$c0,$40 dc.b $00,$c0,$80 dc.b $00,$c0,$c0 dc.b $40,$00,$00 dc.b $40,$00,$40 dc.b $40,$00,$80 dc.b $40,$00,$c0 dc.b $40,$40,$00 dc.b $40,$40,$40 dc.b $40,$40,$80 dc.b $40,$40,$c0 dc.b $40,$80,$00 dc.b $40,$80,$40 dc.b $40,$80,$80 dc.b $40,$80,$c0 dc.b $40,$c0,$00 dc.b $40,$c0,$40 dc.b $40,$c0,$80 dc.b $40,$c0,$c0 dc.b $80,$00,$00 dc.b $80,$00,$40 dc.b $80,$00,$80 dc.b $80,$00,$c0 dc.b $80,$40,$00 dc.b $80,$40,$40 dc.b $80,$40,$80 dc.b $80,$40,$c0 dc.b $80,$80,$00 dc.b $80,$80,$40 dc.b $80,$80,$80 dc.b $80,$80,$c0 dc.b $80,$c0,$00 dc.b $80,$c0,$40 dc.b $80,$c0,$80 dc.b $80,$c0,$c0 dc.b $c0,$00,$00 dc.b $c0,$00,$40 dc.b $c0,$00,$80 dc.b $c0,$00,$c0 dc.b $c0,$40,$00 dc.b $c0,$40,$40 dc.b $c0,$40,$80 dc.b $c0,$40,$c0 dc.b $c0,$80,$00 dc.b $c0,$80,$40 dc.b $c0,$80,$80 dc.b $c0,$80,$c0 dc.b $c0,$c0,$00 dc.b $c0,$c0,$40 dc.b $c0,$c0,$80 dc.b $c0,$c0,$c0 endc Actually, the original and the 3/4/2 version produce very similar results (I've had better results with my quick renderer, probably because I use a different, also non even, palette). The differences are most visible with the 4096 color image I showed you (the original). I think I'm going to leave fast, good rendering alone for a little while, and try my hand at setting 64 colors per four scan lines, and use that as a palette. Don't know how to do it yet, but if done properly it should provide a great quality boost (my quick renderer produces better results with an image specific palette already) at the cost of speed (but that doesn't matter. I want an Aga HamLab like program that cares only about quality). Quote:
Quote:
Last edited by Thorham; 15 March 2010 at 15:31. |
|||||||||||||
18 March 2010, 12:23 | #291 | ||||||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
When you divide by zero, there is no result
Quote:
Quote:
Surely, but it's (too often) the price for new features. Quote:
Really. Quote:
That's very few people Quote:
Quote:
Quote:
Quote:
|
||||||||
18 March 2010, 15:27 | #292 | ||||
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
No result, or an undefined result?
Quote:
Haven't started a serious session yet. Sad but true. It would've been a big help if at least everything was documented properly, but you can hardly blame people for not doing this. Yeah, and I'm not happy about it. I'm between jobs at the moment, so I'm seriously low on cash for extras. Quote:
That's true. Quote:
Quote:
1) Use a better algorithm to determine whether or not to write a palette pixel, and this will probably end up a lot slower. 2) Use a better color picker table (I somehow doubt that your table is 100% perfect for small errors, but my table isn't exactly perfect, either). 3) Use a better base palette (but which colors to pick?). Although there's not an inch of doubt in my mind that things can be done better for fast rendering, right now I have no idea how to do it Tis a strange beasty that HAM it is Although Natami would be ridiculously cool, I'm only interested in it's original Amiga features, I don't care about things like 24 bit color, because I already have that on my peecee and don't need a Natami for that. One of the appealing aspects of the AGA chipset is trying to squeeze the most out of it. Last edited by Thorham; 18 March 2010 at 16:04. |
||||
21 March 2010, 12:54 | #293 | |||||||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Both
Quote:
So, question is : when ? Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
If you find a counter-example, tell me. It means that one color has nothing to do in here and can be replaced by another one ! Adapting the colors to the picture requires scanning it beforehand - and a damn smart method to do so, which I can't think of. Quote:
Quote:
|
|||||||||
21 March 2010, 15:59 | #294 | |||||||
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
Well, you're supposed to use the trap anyway.
Quote:
I'll try it on the newest WinUae beta today. The current version is much faster than the previous version on my old peecee (the version I was using is barely usable here), so there is a very good chance the game will run at the right speed. If so, I can start playing it before getting my A1200 mobo replacement. Actually, when you're low on cash it is. Things like food and bills have to come first. Those things aren't a problem, but after that there's just not much left. Anyway, I can pay for the thing at the end of this month. I had a debt to pay off, and last month was the last term, so I have a little more extra money now. Me neither (haven't given it any thought). Quote:
Quote:
Quote:
Quote:
Quote:
However, there is a better way. Now, this is by no means a complete idea, but it's a start: When rendering a HAM image without a palette, you'll notice that many areas of the image look the way they're supposed to look, right? For those areas you don't need the palette, because the errors are very small. Basically, the color choosing algorithm limits choosing colors from the areas with larger errors, and it can then for those small areas test different color setups to determine which one will yield the smallest error. Of course, this isn't going to be very fast, but it should still be better than just using the 64 colors that best match the image generally. This method becomes especially useful if you set 64 colors per four scan lines. You can start by limiting your color choices to the medium to large error areas, and just use a normal color selection algorithm on those areas, where you just ignore the low error areas. Because you don't have to do anything for those areas, you'll also speed up the routine. This idea probably needs some refining, but it does seem like a good basis for a slower, higher quality rendering routine (especially when used with palette slicing). By the way, can't you use a similar technique for determining when you really don't need to check the base palette in your renderer? For low error areas you don't need the palette anyway, so calculating the palette index and the deltas shouldn't really be necessary, should it? Could save a bunch of cycles. I think I'll implement this in my quick render routine. It's easy to add palette checking to that routine anyway. Quote:
Then buy a peecee, and you'll have all the 24bit you'll ever need No, seriously, where is the fun in that? Last edited by Thorham; 21 March 2010 at 16:08. |
|||||||
24 March 2010, 12:57 | #295 | ||||||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Yes, but I find instructive to know the "undocumented" behaviour.
Quote:
Quote:
Quote:
Quote:
Have you weighted your threshold to update it for 3/4/2 ? 2/3/1 leads to a total of 6, so if you didn't, you'll get a different result because 3/4/2 gives 33% bigger error values (hence you need a 33% bigger threshold). Not really. There isn't a choice of palette vs ham. There are 4 types of pixels, of which 3 are computed together because it's easier - and quicker - this way. Quote:
Quote:
Quote:
Quote:
Well, where's the fun in having AGA when you already had ECS ? |
||||||||
24 March 2010, 17:33 | #296 | |||||||
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
Quote:
Quote:
Yes, and it wasn't a lot of fun. The good news is that my new Pentium 3 runs WinUae better than my old one. The old ones main problem was the dying CPU fan, which caused breaks in the program execution when the load became high (it would start spinning faster, then you'd get the break, and then it would slow down again and this recently become worse). Which means I can start playing properly Hahaha Actually, I'm getting my money this week, and I'm sending the money over for the mobo on the same day, so it's a done deal Quote:
Quote:
Quote:
Quote:
Quote:
Hey, I'm just saying, that you can never be a 100% certain Good point, but for me HAM8 is the perfect balance between quality and having to puch things to get the best resaults. ECS HAM only works in lowres, and the bit depth is a little too low. Also, HAM6 and HAM8 are mostly the same, and a good HAM8 algorithm will probably work perfectly fine with HAM6. Edit: I'll most certainly be getting back into this HAM rendering business. My old monitor had become quite dark and when I tried my HAM diff program on my new monitor, it showed a whole world which was previously invisible Perhaps now that I can see what I'm doing, I can crack quality fast rendering (or maybe not ). Last edited by Thorham; 26 March 2010 at 06:40. |
|||||||
26 March 2010, 08:36 | #297 | |||||||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
As there isn't much researching in the field, it's likely I can sleep a big while before this happens Quote:
Quote:
|
|||||||||
26 March 2010, 17:18 | #298 | ||||||
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
Quote:
Quote:
I've sent my bank the transfer details, but it's by mail (yeah, quite old fashioned ), so it will take about a week or so for the money to arrive, and then it'll probably take another week for the mobo to arrive. Three weeks maximum Which is fine with me, because WinUae runs better on my 'new' peecee, so I can certainly make do with it. Yes, quite weird, but I'm going to coninue with this stuff as of today. I had taken a break from HAM rendering, because I over did it 'a little', and ran out of ideas, but I'm refreshed now Quote:
Yes, I bought one anyway (500 giga bytes). Basically I had to pay 100 Euros every month to pay off a debt, but now that I don't have to anymore, I can spend the money as I see fit, which means I can pay for the A1200 mobo and a new hard drive Quote:
Quote:
Quote:
Edit: My ideal setup is two A1200s, one with an '030 and one with an '060, where the '030 would get the most usage. For me no 24 bit cards, no power peecee and no 16 bit audio (if I want all that, I'll just use my peecee) Was it really that unreadable? What editor, font and resolution do you use? Last edited by Thorham; 28 March 2010 at 17:32. |
||||||
30 March 2010, 14:40 | #299 | ||||||
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,355
|
Quote:
Quote:
Quote:
Quote:
What I mean is that speed opts for rows of identical pixels gain nothing on some images, but gain a lot on others. You will never know if you will, or not, often have error values of zero. Quote:
Quote:
Not unreadable but less clear, even with regular topaz 8 on 640x256. |
||||||
31 March 2010, 22:07 | #300 | ||||||
Computer Nerd
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 48
Posts: 3,839
|
Quote:
Quote:
I must admit that I haven't tried much, because there are quite a few things to try, actually. One thing is certainly a big relief, and that's that there's no more fixed palette. That's such a limitation for getting optimal results (simply impossible with a fixed palette). Nope, something whit the rent. Where I live they won't kick you out immediately if you can't pay for a few months, but they will still want the money Quote:
Quote:
Quote:
A good example is the good old Paula (this is from when my Amiga still worked). I always thought that calibration didn't do much, until I was playing back some Playstation 2 music using WinAmp. This music is 48 Khz, and WinAmp was playing it back at 44 Khz (after messing around with the settings), and it sounded noisy, and guess what? I've been using WinAmp to downsample music to 24 Khz, and WinAmp uses fast and cheap routines to downsample! When I tried Sox (has slow, high quality down sampling) to down sample that Playstation music to 44 Khz it sounded just fine. So I tried down sampling something to 28 Khz with Sox, played it back on my Amiga (streaming over the network ), and it sounded fantastic Much better than that awful WinAmp down sampling routine, and there was quite a difference between calibrated and uncalibrated as well. Clearly the Amiga hardware can be pushed quite a bit if you do it right, and expanding it will take all of that away Quote:
Okay, but I'd still like to know which editor you use (just curious). |
||||||
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Old KGLoad Discussion | killergorilla | project.KGLoad | 357 | 20 January 2011 16:08 |
Castlevania Discussion | john4p | Retrogaming General Discussion | 30 | 30 January 2009 02:10 |
ROM Discussion... | derSammler | project.EAB | 41 | 29 January 2008 23:36 |
General Discussion | Zetr0 | project.Amiga Game Factory | 12 | 15 December 2005 13:53 |
|
|