It is currently Mon Jun 26, 2017 11:56 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: Sun May 14, 2017 11:18 am 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 262
Location: Colorado USA
So yeah, when I assembled, the binary file it created was larger then the CHR bank and text file combined. the text file was 2k and the chr file was 8k, and when I assembled, I got a 40k Binary. As a matter of fact, I'll give you the code and CHR file to debug it. And when I opened it up in YY-CHR, it had a lot of unused space, and I mean a lot. When you open it with a hex editor, most of the 40k is just $00. Why it assembled this way? I have no clue.


Attachments:
New WinZip File.zip [4.63 KiB]
Downloaded 17 times
Top
 Profile  
 
PostPosted: Sun May 14, 2017 11:32 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 9757
Location: Rio de Janeiro - Brazil
DementedPurple wrote:
the text file was 2k and the chr file was 8k, and when I assembled, I got a 40k Binary.

This is correct. Text and binary 6502 code are 2 completely different things. Not only that, but NES ROMs need padding to fill the entire ROM chip in order to be valid.

Quote:
And when I opened it up in YY-CHR, it had a lot of unused space, and I mean a lot.

Padding. As you write more code, the empty space will reduce, but if you're assembling a program with 32KB of PRG-ROM, the entire space must be reserved, whether you're using it or not, otherwise the resulting ROM file won't be valid.


Top
 Profile  
 
PostPosted: Mon May 15, 2017 5:13 pm 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 262
Location: Colorado USA
Okay, now my code does literally nothing at all. Just to make sure, I did a simple program that loads the number 5 into the accumulator and it won't even do that. It does nothing at all.


Top
 Profile  
 
PostPosted: Mon May 15, 2017 6:12 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 10:59 pm
Posts: 1377
DementedPurple wrote:
Okay, now my code does literally nothing at all. Just to make sure, I did a simple program that loads the number 5 into the accumulator and it won't even do that. It does nothing at all.

Perhaps you could explain to us, in detail, exactly how it was that you came to this conclusion.

_________________
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.


Top
 Profile  
 
PostPosted: Mon May 15, 2017 6:47 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 9757
Location: Rio de Janeiro - Brazil
Source code?


Top
 Profile  
 
PostPosted: Tue May 16, 2017 8:24 am 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 262
Location: Colorado USA
I'm going to comment it better when I have access to my computer.


Top
 Profile  
 
PostPosted: Tue May 16, 2017 6:05 pm 
Offline

Joined: Mon Jan 30, 2017 5:20 pm
Posts: 262
Location: Colorado USA
I think I found a glitch when looking through my code, I'll respond if it still doesn't work.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 7 hours


Who is online

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