English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 03 September 2016, 08:03   #1
Knocker
Registered User
 
Join Date: Jan 2016
Location: Santa Cruz/US
Posts: 48
Rotating cube getting cutoff

Hi everyone.

I managed to code something I never could do back in the day - a rotating vector cube, see attachment (only rotates around one axis for brevity). Unfortunately lines in the top ~1/8 of the screen are cutoff. I've done quite a bit of troubleshooting:

Tried two different start-up routines (see source and a VB IRQ one)
Tried two different drawline routines (see source and the one from Amiga System Prog's Guide)

Meaning the problem should be in my RotateCube routine.

Tried two ways of erasing previous cube: 1. Blit zeroes to screen (see source) 2. Redraw cube with black lines ($dff072=0).

Using A500/ROM1.3/A501, and tested both WinUAE (PAL & NTSC) and real HW (NTSC).

Tried to rotate the code every other VB, and then it works fine.

Maybe the code is simply too slow?!

Thoughts anyone? Help much appreciated.
Attached Files
File Type: s RotateCube.s (9.8 KB, 311 views)
Knocker is offline  
Old 03 September 2016, 10:49   #2
Apollo
Registered User
 
Apollo's Avatar
 
Join Date: Sep 2008
Location: Germany
Age: 49
Posts: 137
Had just a quick view on the code: you don't double-buffer, don't you? My guess is that the raster-beam is already some lines down the screen before the lines are drawn. So you only see the cleared bitmap, because you clear the bitmap first after reaching the first rasterline.
I would create a second bitmap. Then you have to change the bitmap pointers every frame. One bitmap is shown, the other bitmap is getting worked on.

best regards,
Stefan

P.S.
To keep the things simple you could try to start clearing, rotating and drawing the stuff not at line 1 but much lower before you reach the vertical blank. This could be just enough time for clearing the bitmap and drawing stuff. But anyway, if you're going to add things you have to double-buffer to avoid chasing-the-beam stuff
Apollo is offline  
Old 07 September 2016, 08:13   #3
Knocker
Registered User
 
Join Date: Jan 2016
Location: Santa Cruz/US
Posts: 48
Thanks Stefan - I tried double buffering and then it renders properly. A little surprised it is needed for something as relatively simple as this, although I haven't tried your other suggestion.
Knocker 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
Cube 68k arti support.Games 41 03 December 2019 16:53
Changing A600 sound cutoff/butterworth 8bitbubsy support.Hardware 9 06 November 2018 17:58
Amiga Cube? fondpondforever Amiga scene 3 25 June 2015 08:40
Dingoo + Game cube lot lolafg MarketPlace 3 19 July 2010 15:49
Speccy on a cube daznic Retrogaming General Discussion 1 03 June 2009 19:44

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:36.

Top

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