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 > fetch the 0-sprite. with open borders...
2010-05-17 18:59
Testa
Account closed

Registered: Oct 2004
Posts: 197
fetch the 0-sprite. with open borders...

hi,

ik have a little problem.. i want to open the sideborders with the 4 lowest sprites... i have two questions about it..

when i do the D016 write i use a dec d016 or a lsr or ror as opcode... why does a sty, sta, stx not work....
has it something to do with cpu takeover cycles at that point...

second question... what to do on a badline....

there are not enough free cycles. with 4 sprites for a inc, ror or lsr d016 instead of a sta, sty or stx...

i realize it is common knowledge.. but sorry i dont. know it...

bye...

 
... 36 posts hidden. Click here to view all posts....
 
2010-05-20 15:30
Ninja

Registered: Jan 2002
Posts: 411
Technically yes. SuperCPU seems more fun to me, though. You can use the CPU while the VIC fetches data (as long as you don't access the c64-memory-map).
2010-05-20 19:59
Monte Carlos

Registered: Jun 2004
Posts: 359
Why on earth would i use sprite 0, if i have 8 over n possibilities to assign all the sprites and get the same effect?
2012-11-09 14:10
Rastah Bar
Account closed

Registered: Oct 2012
Posts: 336
Quote: See this graph: In cycles marked with "X" (during takeover), writing is possible, reading not. RMW opcodes are special because their last *two* cycles are write-cycles. This way, you can still access the cycle yo need for opening the border. STA has just the final cycle as write cycle, that is not enough.

Where can i find some info about this RMW stuff? In particular, is there some webpage where you can see for all instructions what is happening in each of the cycles?
2012-11-09 16:59
MagerValp

Registered: Dec 2001
Posts: 1078
http://vice-emu.sourceforge.net/plain/64doc.txt
2013-01-07 12:39
Flavioweb

Registered: Nov 2011
Posts: 463
I tought that is a way to use sprite 0 (almost in pal) and open side border with a badline, but it's from top of my mind, so not tested or coded yet.
Sprite zero is fetched at cycle 59, with a takeover of three cycles before it.
Looking at vic article scheme for a badline where sprite zero is enabled, we can see that at cycle 55 BA is up.
That said, in the first part of a badline, BA stay up until cycle 12.
If we have a stable raster routine, via CIA timing that let us to stat a LDA/STA at cycle 8 of a line, we can do an lda #$xx/STA $D016 ending with cycle 3 of STA (last read cycle) on cycle 12 of the badline.
So, cpu is halted here, leaving the write cycle to be executed during the cycle 55 of the badline, theoretically opening the border.
Then we have all time to restore $D016 value as needed.
From the top of my mind... of course.
2013-01-07 21:08
Copyfault

Registered: Dec 2001
Posts: 478
@Flavioweb: nice idea, but it won't work because also the read cycle causing the cpu to halt is postponed, i.e. there's always a read cycle before any write cycle.

You suggest to shift the 3rd cycle of the STA to cycle 12 of a BL. By doing this, the read cycle of the STA is NOT processed at cycle 12, but (if we stick to your example with only sprite 0 turned on) at cycle 60 of the very same rl. The write cycle of the STA follows at cycle 61. Unfortunatly, this is to late for opening the sideborder :(
2013-01-08 05:27
Flavioweb

Registered: Nov 2011
Posts: 463
Quoting Copyfault
You suggest to shift the 3rd cycle of the STA to cycle 12 of a BL. By doing this, the read cycle of the STA is NOT processed at cycle 12, but (if we stick to your example with only sprite 0 turned on) at cycle 60 of the very same rl. The write cycle of the STA follows at cycle 61. Unfortunatly, this is to late for opening the sideborder :(

Ok, maybe that processor is halted BEFORE last read cycle then, last read cycle and write cycle of STA are postponed to cycle 55 of the line.
Here we have cycle 55 with BA up, then 3 cycle of takeover (BA low), then 2 cycle to fetch sprite zero.
Since processor can't be halted during write operations, could not be that we have -read cycle of STA at cycle 55 of the line- and -write cycle of STA at cycle 56 of the line-?

This would work, or not?
2013-01-08 16:11
Fresh

Registered: Jan 2005
Posts: 101
This only applies on NTSC vics (6567); PAL vics (6569) haven't got 'free' cycles between badline and sprite 0 fetch: BA stays low from cycle 12 to 59, so the cpu stops somewhere in cycles 12-14 and restarts at 60.
2015-03-08 17:32
Flavioweb

Registered: Nov 2011
Posts: 463
In this demo:
In the Border We Trust
there are 8 sprites and no border at all...
2015-03-08 18:16
Mr. SID

Registered: Jan 2003
Posts: 424
No bad lines in that one...
Previous - 1 | 2 | 3 | 4 | 5 - 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
MWR/Visdom
Mike
Trap/Bonzai
Case/Padua
.jetan/AI-supported ..
Airwolf/F4CG
B.A./QUANTUM
Walt/Bonzai
Titus/Rabenauge
Paulko64
Alakran_64
grasstust/Hoaxers
RS-232
iceout/Avatar/HF
Guests online: 135
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Layers  (9.6)
2 No Listen  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Triad  (9.3)
5 Censor Design  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Facet  (9.4)
5 Shine  (9.4)

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