It is currently Thu Sep 20, 2018 5:36 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 47 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
PostPosted: Tue Jun 26, 2018 12:19 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10814
Location: Rio de Janeiro - Brazil
kikutano wrote:
The sourcecode complete is here: https://pastebin.com/689fHti0

You're not setting up stuff before running the code in question... A doesn't hold the level index, it holds whatever the loop above got from bg_lvl_top_corner. You're also not setting a vram address via $2006, so it's whatever the code above left it as.

Also, with this method, tables aren't limited to 256 bytes anymore, so the table of pointers only needs to point to the beginning of each NT:
Code:
LevelPointers:
  .dw bg_lvl_1_0, bg_lvl_2_0

If you put all those labels in the list, you'll be mixing partial name tables if you use indices that are not multiples of 4.

Another thing to consider is that my example code copies 1024 bytes to vram, because I assumed you'd be copying an NT and an AT together in one chunk, which doesn't seem to be the case. Well, there's nothing wrong with copying invalid AT data if you'll overwrite it with the correct data afterward, so I don't think you have to worry about it for now.


Top
 Profile  
 
PostPosted: Wed Jun 27, 2018 12:33 am 
Offline

Joined: Sat May 26, 2018 6:14 am
Posts: 41
Location: Italy
Thanks a lot! :)


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 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