Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in 
CSDb User Forums


Forums > C64 Coding > Fast way to rotate a char?
2017-01-04 09:32
Rudi

Registered: May 2010
Posts: 98
Fast way to rotate a char?

Im not talking about rol or ror, but swap bits so that they are rotated 90 degrees:

Example:

a char (and the bits can be random):
10110010 byte 1..
11010110 byte 2.. etc..
00111001
01010110
11011010
10110101
00110011
10110100
after "rotation" (rows and columns are swapped):
11001101
01011000
10100111
11111111
00101000
01010101
11011010
00100110
is it possible to use lookup tables for this or would that lookup table be too big?
or other lookuptable for getting and setting bits?

-Rudi
 
... 99 posts hidden. Click here to view all posts....
 
2017-01-04 14:01
Axis/Oxyron

Registered: Apr 2007
Posts: 82
I was assuming hires 8x8 chars. That makes the most sense and is the most interesting challenge. And looks like it´s what Rudi is watching for.
2017-01-04 14:38
Rudi

Registered: May 2010
Posts: 98
yes, i was initially looking at hires 8x8 char.

Edit: current techniques just seem too slow for many chars. wished someone could do some magic tricks :)
2017-01-04 14:46
JackAsser

Registered: Jun 2002
Posts: 1242
Btw, Axis is talking about this (from Mikael Kalms): http://www.lysator.liu.se/~mikaelk/doc/c2ptut/
2017-01-04 14:50
Axis/Oxyron

Registered: Apr 2007
Posts: 82
Thanks for sharing my link jacky.^^
2017-01-04 15:12
JackAsser

Registered: Jun 2002
Posts: 1242
Quote: Thanks for sharing my link jacky.^^

Jesus, I'm tired...
2017-01-04 15:25
Oswald

Registered: Apr 2002
Posts: 4091
Quote: Btw, Axis is talking about this (from Mikael Kalms): http://www.lysator.liu.se/~mikaelk/doc/c2ptut/

huh, that needs a relaxed state and time to have it sink in :)
2017-01-04 15:27
Groepaz

Registered: Dec 2001
Posts: 8216
JackAsser is halfway there apparently :=)
2017-01-04 15:35
Axis/Oxyron

Registered: Apr 2007
Posts: 82
When he is through, its time to go Amigaaaah!!!
2017-01-04 15:45
JackAsser

Registered: Jun 2002
Posts: 1242
Quote: When he is through, its time to go Amigaaaah!!!

Haha, I got semi tired of it after setting up that HAM8-mode. :) But it was a fun excercies and fun to figure out the bitpatterns myself, then you told me, and I was actually correct (for once).
2017-01-04 15:50
Perplex

Registered: Feb 2009
Posts: 197
Quoting Rudi
current techniques just seem too slow for many chars. wished someone could do some magic tricks :)


Magic sometimes happens when you ditch working on a generic solution and instead concentrate on one that fits your particular data set or use case.

Not implying that a generic solution is less interesting, mind.
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Zardax/Artline Designs
codise
Matt
DuncanTwain
Flavioweb/🇮🇹ASR/HF🇮🇹..
Xenox/Alpha Flight 1..
Mr Ammo/SCS*TRC
Andy/AEG Soft
Ziili/Extend
Guests online: 67
Top Demos
1 Uncensored  (9.7)
2 Edge of Disgrace  (9.7)
3 Coma Light 13  (9.6)
4 The Shores of Reflec..  (9.6)
5 Lunatico  (9.6)
6 Quad Core 100%  (9.5)
7 Comaland 100%  (9.5)
8 Incoherent Nightmare  (9.5)
9 Wonderland XII  (9.5)
10 Comaland  (9.5)
Top onefile Demos
1 Pandemoniac Part 2 o..  (9.6)
2 Synthesis  (9.6)
3 Dawnfall V1.1  (9.5)
4 Daah, Those Acid Pil..  (9.5)
5 Field Sort  (9.4)
6 Treu Love [reu]  (9.4)
7 Dawnfall  (9.3)
8 Globe 2016 [reu]  (9.3)
9 KAOS 64  (9.3)
10 Hardware Accelerated..  (9.2)
Top Groups
1 Booze Design  (9.4)
2 Censor Design  (9.4)
3 Oxyron  (9.4)
4 Crest  (9.3)
5 Finnish Gold  (9.3)
Top Diskmag Editors
1 Jazzcat  (9.5)
2 Peter  (9.4)
3 Newscopy  (9.4)
4 Remix  (9.3)
5 Vengeance  (9.3)

Home - Disclaimer
Copyright © No Name 2001-2017
Page generated in: 0.333 sec.