It is currently Tue Dec 12, 2017 8:48 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Jun 15, 2017 2:24 pm 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 5892
Location: Canada
tokumaru wrote:
Indexed ZP addressing is as slow as absolute indexed addressing

True for LDA, but with STA or INC it's one cycle faster.


Top
 Profile  
 
PostPosted: Thu Jun 15, 2017 4:12 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10164
Location: Rio de Janeiro - Brazil
You're right, I forgot to compare STA.

Anyway, no matter what you put there, I think that mapping ROM to ZP is a HUGE waste. Loading from ZP is only faster if you don't use an index, which means you need to know the address you're going to read at assembly time. Since it's ROM, if you know the address you know the value that's there, so you might as well use immediate addressing and get the value loaded even faster!

But even if for some miracle you made anything simpler/faster with a particularly magical set of 256 bytes of ROM, that would hardly justify sacrificing the use of pointers. Without pointers, certain tasks would be much harder or would need more code.

If you think that ROM in ZP provides any sort of advantage over the normal setup, that just shows that you still don't get how the 6502 works and how CPU resources are applied to the various tasks necessary in a game.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bavi_H and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group