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


Forums > C64 Coding > Decimal arithmetic on the C=64 and bitmaps
2003-02-04 15:39
Dr. Jay
Account closed

Registered: Jan 2003
Posts: 32
Decimal arithmetic on the C=64 and bitmaps

Looking for commented source/tutorials on:

1. Floating point computations
2. Bitmapping ... I know that you have to byte-align and then plot your pixel but I don't know the "fast" routines for doing so

Thanks.
2003-02-04 17:26
CreaMD

Registered: Dec 2001
Posts: 3034
Hint: It could be quite cool if you first checked google, then came here asking for additional questions... maybe.

Roman
2003-02-04 21:53
Stryyker

Registered: Dec 2001
Posts: 465
for fast pixel plotters for bitmaps. Time can develop one or check comp.sys.cbm in the pasy year where this was discussed. Comes back to CreaMD, check google, groups.google.com :)
2003-02-05 08:59
yago

Registered: May 2002
Posts: 332
Most often, Coders do not use "real" bitmap, but set up an array of characters to speed up plotting.
e.g.
@E
AF
BG
CH
DI
...
If you want to do full-screen bitmap plotting, a table with the addresses of the lines might speed things up.
Something like:
word $2000,$2001,$2002,$2003,$2004,$2005,$2006,$2007
word $2000+320,$2000+321 ...
Except that the table should be split into two table of lo/high values.

I have no Idea about Floating Point, most Folks seem to use fix-point instead. Maybe you should take a Look how the Basic does floating point arithmetic.
2003-02-05 11:54
Dr. Jay
Account closed

Registered: Jan 2003
Posts: 32
Cool. I'll check out all of those resources. It's tough coming back after 13 years when all the rage in '86 that I was exposed to were raster routines, sprite moves, and FLD effects. Now I jump on here asking basic questions, and the people frequenting the board are some of the best coders in the C=64 scene - probably rolling their eyes and going, "Why do people even ask about stable interrupts ... I had those assigned to a macro key 10 years ago ..." LOL.
2003-02-06 04:59
White Flame

Registered: Sep 2002
Posts: 136
For floating point info, check out Mapping the C64 for documentation on the 64 routines and disassemble them to see how it's done. For a really tight implementation of fp, hit http://www.6502.org .
2003-02-06 13:50
MagerValp

Registered: Dec 2001
Posts: 1055
But you rarely need FP. Fixed point is both simpler, faster, and accurate enougn for pretty much everything you ever do in a demo.
2003-02-07 12:41
chatGPZ

Registered: Dec 2001
Posts: 11114
1) you dont need floats... if you ever really do (to precalculate some stuff or whatever), use the basic-rom.
2) google for apple2 and floating point and grab the implementation from steve wozniak...nice, tight, well documented (and piece of history aswell)
2003-02-07 23:23
White Flame

Registered: Sep 2002
Posts: 136
Woz's implementation: http://www.6502.org/source/floats/wozfp3.txt
2003-02-08 12:59
Graham
Account closed

Registered: Dec 2002
Posts: 990
Quote: But you rarely need FP. Fixed point is both simpler, faster, and accurate enougn for pretty much everything you ever do in a demo.


and on some calculations fixed point is even more accurate than floating point, especially when your calculations are in a limited range of numbers or your fraction is based on another number base than two (like for example: dollars and cents, you would never use floating point to represent the cents).
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
Martin Piper
iceout/Avatar/HF
CreaMD/React
Peacemaker/CENSOR/Hi..
6R6/shape/[n0]
Airwolf/F4CG
Guests online: 136
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Bromance  (9.6)
10 Memento Mori  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Graphicians
1 Sulevi  (10)
2 Mirage  (9.8)
3 Lobo  (9.7)
4 Mikael  (9.7)
5 Archmage  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.06 sec.