English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General > Coders. Tutorials

 
 
Thread Tools
Old 24 October 2010, 22:06   #21
Codetapper
2 contact me: email only!
 
Codetapper's Avatar
 
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,182
PMC: Say goodbye to your free Amiga time from now on! My daughter is 4 weeks today and I've hardly had time to do anything the last month!
Codetapper is offline  
Old 24 October 2010, 23:36   #22
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Quote:
Originally Posted by pmc View Post
I will do Brett, as soon as we're finished at the hospital - just waiting to leave - our little son was born yesterday! \o/


Congratulations.


Regards,
Lonewolf10
Lonewolf10 is offline  
Old 25 October 2010, 09:35   #23
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Quote:
Originally Posted by pmc View Post
I will do Brett, as soon as we're finished at the hospital - just waiting to leave - our little son was born yesterday! \o/
Congratulations from me too!
StingRay is offline  
Old 25 October 2010, 10:18   #24
Siggy999
Registered User
 
Siggy999's Avatar
 
Join Date: Mar 2008
Location: Las Vegas/Nevada
Posts: 103
Congrats!

I found I had very little free time all last year while my wife was pregnant (being lucky enough to work from home) and when the kids were born in May (twins - boy and girl) everything but work/sleep/kids/housework went out the window.

The good news was that after setting up the A2000 and monitor in the nursery (mainly so I could play dvds on the monitor for them) I've found that tooling around on it while they nap is not only really relaxing and gets my head back into my 'calm place', but I've made far more progress on projects than I have in the last 2 years (when I managed to finish getting the machine working).

All the best with your new arrival, they're a handful, but by far the most rewarding thing that's ever happened in my life.
Siggy999 is offline  
Old 25 October 2010, 12:32   #25
TheDarkCoder
Registered User
 
Join Date: Dec 2007
Location: Dark Kingdom
Posts: 213
My warmest congratulations!

My daughter's birthday is the 23 of october. Is it the same day?

My daughter is now 3 years old. In these 3 years I was able to code almost nothing. Moreover, I was unable to find the time and the proper calm to mount a 68882 on my Blizzard 1230 and a Cybervision on my A4000

I also have many difficulties in updating software for my Amigas (still with old versions of many MUI classes) and in doing regular backups.
Gaming? I don't dare, I'll wait when she's a little olderso we can play together.

But despite all this, I am very happy as a father !!!
TheDarkCoder is offline  
Old 25 October 2010, 12:48   #26
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
@ TCD & Lonewolf10 - thank you guys, much appreciated.

@ Codetapper - LOL - yeah, I think I might be taking a small break for a while but I won't stop coding when (if...!? ) I ever do get the time. All the best to you and your little one.

@ StingRay - thanks man, I'll be telling the little guy all about his uncle StingRay as he grows up.

@ Siggy999 - thanks man - everyone I speak to says that it's the best experience ever and I'm already finding it quite overwhelming. But twins! Well, what can I say? You *really* have your work cut out! Congratulations to you and your wife.

@ TheDarkCoder - yes! 23rd October is my son's birthday too. All the best to you and your little one.

Thanks for all your kind words guys!
pmc is offline  
Old 25 October 2010, 14:02   #27
victim
Registered User
 
Join Date: Mar 2009
Location: N/A
Posts: 23
Quote:
Originally Posted by pmc View Post
I will do Brett, as soon as we're finished at the hospital - just waiting to leave - our little son was born yesterday! \o/
Hi PMC

and i Congratulations to you and wish them all the best !

so long..
victim
victim is offline  
Old 25 October 2010, 14:51   #28
korruptor
TDI
 
korruptor's Avatar
 
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
Congrats PMC!

The 23rd is my Birthday as well.
korruptor is offline  
Old 26 October 2010, 20:07   #29
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Congratulations to you and Codetapper on becoming fathers

About the dot effects, in 15 years from now when you have time for coding again, you can look into using precomputed blocks of code.

The simplest method is generating code that plots fixed patterns which can be offset anywhere on the screen by adjusting the registers before you jump into the code.

Code:
Provide a coordinate value in D0/D1 and
calculate its offset into the bitplane

muls.w  #40, d1
moveq   #7, d2
and.b   d0, d2
asr.w   #3, d0
add.w   d0, d1

D1 holds the offset and D2 is the X coordinate modulo 7 which
we need in order to pick the right OP-code and write the
complete instruction to memory

lsl.w   #2, d2
move.w  opcodes(pc, d2.w), (a0)+
move.w  d1, (a0)+

... repeat for all dots in this pattern

Finish the code block by writing an absolute jmp instruction
that returns us to the end of our work loop

move.w  #$4EF9, (a0)+
move.l  #ReturnPoint, (a0)+

... go do next pattern

opcodes:

or.b    D0, 1(A0)
or.b    D1, 1(A1)
or.b    D2, 1(A2)
or.b    D3, 1(A3)
or.b    D4, 1(A4)
or.b    D5, 1(A5)
or.b    D6, 1(A6)
or.b    D7, 1(A7)
To f.ex draw a blanket of dots you would precompute f.ex a few hundred animated horizontal strings of 32 dots each, and then run 32 of these blocks of code and plot vertically down the screen.

To f.ex plot something at offset 0, 0 you would set up your registers like this:
Code:
D0 to D7: $80 $40 $20 $10 $08 $04 $02 $01
A0 to A7:   0   0   0   0   0   0   0   0
for offset 2, 3 with 40 bytes wide bitplanes you would do:
Code:
D0 to D7: $20 $10 $08 $04 $02 $01 $80 $40
A0 to A7: 120 120 120 120 120 120 121 121
etc.
Leffmann is offline  
Old 26 October 2010, 23:20   #30
Asman
68k
 
Asman's Avatar
 
Join Date: Sep 2005
Location: Somewhere
Posts: 828
Hi

Congrats for PMC and Codetapper.

I must agree with Codetapper, because ... my son have about 16 months and I can only find about 1h per week to launch amiga.

There is another easy trick with dots. You can use more bitplan then one to show more dots. Just set background color to black and rest of colors to white. And copy bitplane pointers from bpl0pth and bpl0ptl to bplxpth and bplxptl with some offsets.

Regards
Asman is offline  
Old 27 October 2010, 21:33   #31
Plagueis/KRX
coder
 
Plagueis/KRX's Avatar
 
Join Date: Jul 2009
Location: a galaxy far far away
Age: 49
Posts: 84
Wow!!! Congrats to both of you dudez!
Plagueis/KRX is offline  
Old 09 November 2010, 11:25   #32
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Hey fellas

Back at work now after my two weeks paternity leave I had some time to code again.

So, check out the attached .exe of a little intro I made for a glimpse of my new faster plot routine in action. I decided to avoid a standard dotflag and go for a formation that seemed a little more appropriate.

707 plots in one frame in this little intro, there's room for a few more but then it'd be right on the limit of fitting in a single frame so I think the routine can still do with being made quicker.

Enjoy.

no longer attached but optimised and fixed version of the Jacob plotter is available here: http://retro.untergrund.net/prods.html

Last edited by pmc; 21 November 2010 at 21:36. Reason: removed .exe and added link
pmc is offline  
Old 09 November 2010, 19:38   #33
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Cool!
Leffmann is offline  
Old 09 November 2010, 19:51   #34
StingRay
move.l #$c0ff33,throat
 
StingRay's Avatar
 
Join Date: Dec 2005
Location: Berlin/Joymoney
Posts: 6,863
Indeed, and cute! Really made me smile, nice one pmc!
StingRay is offline  
Old 10 November 2010, 19:49   #35
Herpes
... aka Amix73
 
Herpes's Avatar
 
Join Date: Jan 2009
Location: Austria
Posts: 87
Quote:
Originally Posted by pmc View Post
...
Enjoy.
Respect!
... also a very nice tune
Herpes is offline  
Old 13 January 2011, 12:59   #36
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
For a new thing I'm working on I want to make a dot ball to make use of my faster plotter. I want it to be as nice as the one in Phenomena's Enigma demo. That one is supposedly 800 points. Now rotating, plotting and hiding the hidden points is not possible in one frame without some serious cheating with shortcuts.

So, now I'm thinking about how to get it done. I've got an idea for reducing the number of points any calculations need to be done on and wondered what you guy's thoughts were...?

My basic idea is this:

Can't I generate the point locations for a whole 800 point dot ball by rotating only 100 points and then negating x and y values to get the locations of the rest...?

Check the pics of a dotball viewed face on. Stage one would be to negate only the x values of the first 100 points to get the second 100 points. Stage two would be to negate the y values of these 200 points to get the second 200 points giving me the visible points of the dotball.

What do you guys think - is this or something similar feasible...?

Last edited by pmc; 07 February 2011 at 10:35.
pmc is offline  
Old 17 January 2011, 11:56   #37
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Done a bit more playing around.

I've worked out a set of 3d points now for an 800 point, radius 60 pixels, dotball.

As per something Leffmann said in another thread, when these are translated to 2d points and plotted they look OK as they are ie. no need for perspective transform. This will save time as only adds and subs are needed to convert 3d to 2d - no divides required.

So, now I need to work out some shortcuts with the rotations and get some kind of mirroring working and I should get a nice dotball going.
pmc is offline  
Old 17 January 2011, 12:46   #38
korruptor
TDI
 
korruptor's Avatar
 
Join Date: Feb 2007
Location: Blitter Town
Posts: 124
Not sure what you're thinking, but mirroring the top left to the top right would mean the dots converge at the middle, wouldn't it?
korruptor is offline  
Old 17 January 2011, 19:17   #39
Lonewolf10
AMOS Extensions Developer
 
Lonewolf10's Avatar
 
Join Date: Jun 2007
Location: near Cambridge, UK
Age: 44
Posts: 1,924
Quote:
Originally Posted by korruptor View Post
Not sure what you're thinking, but mirroring the top left to the top right would mean the dots converge at the middle, wouldn't it?

I have not experience in this (yet), but I suspect you are correct. The way I would do it is to calculate the top half dots and then mirror that to create the bottom half (using a negative modulo with the bitplanes).


Regards,
Lonewolf10
Lonewolf10 is offline  
Old 17 January 2011, 22:33   #40
pmc
gone
 
pmc's Avatar
 
Join Date: Apr 2007
Location: completely gone
Posts: 1,596
Quote:
Originally Posted by korruptor
Not sure what you're thinking, but mirroring the top left to the top right would mean the dots converge at the middle, wouldn't it?
I did some testing with this today - worked just fine as per my mirroring post.

Quote:
Originally Posted by Lonewolf10
The way I would do it is to calculate the top half dots and then mirror that to create the bottom half (using a negative modulo with the bitplanes).
This might work for a static image (negative modulos to repeat rows of the displayed bitplane - a bit like copper "reflections") but I'm not sure how well this would work in this context. I need to be able to 3d rotate as few points as possible and mirror the rest to make it look like lots more points are rotated.

Using my method I should be able to rotate and bounce an 800 point dotball but only actually be rotating 100 points to do so. Even this may still need some short cutting to achieve in one frame when the other parts of the routine are added in...

I won't know for sure what all the short cuts needed are until I discover them and iron them out.

I'm working on it - reckon I'll have this one all done in the next few days.
pmc is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Flag by Gremlin BippyM project.aGTW 43 22 December 2010 22:24
ASCII and Experimental Epson Dot Matrix Printer Emulation AmigaBoingBall support.WinUAE 1 27 May 2009 18:39
save flag Marcuz HOL suggestions and feedback 1 08 September 2006 01:18
Almost Free Color Dot Matrix Printer IBM/AMIGA le geek MarketPlace 0 06 May 2004 00:48

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 18:08.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09899 seconds with 13 queries