6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 2:52 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Sat Jun 06, 2009 1:45 pm 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
Still doing the pinball, got a 256 entry table of 8 bytes of data in each field. I get some munged lines here and there from a memory leak that shuts down the editor at times. But this error knocks my brain:

ERROR E020: Wrapped program counter. ROW 3434, FILE C:\Documents and Settings\Tony\My Documents\Current Projects\Bally Brain 2\Fireball\Software\Rev 2\FireballRev2.65s

The table looks like this, or the last part..
.DB $00, $00, $00, $00, $00, $00, $80, $00 ; $F9 =
.DB $00, $00, $00, $00, $00, $00, $80, $00 ; $FA =
.DB $00, $00, $00, $00, $00, $00, $80, $00 ; $FB =
.DB $00, $00, $00, $00, $00, $00, $80, $00 ; $FC =
; .DB $00, $00, $00, $00, $00, $00, $80, $00 ; $FD =
; .DB $00, $00, $00, $00, $00, $00, $80, $00 ; $FE = wierd wrappped counter bug here
; .DB $00, $00, $00, $00, $00, $00, $80, $00 ; $FF =

I define at the beginning the address for it....(the comment is my own to tell me what the @$@%^# is going on here...)





If I comment out the final 3 or so lines of the data table, it complies without a hitch.

Am going to try later on toi put into a text table to remove invisible characters and re-input once again. If that doesnt work....HALP!

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Jun 06, 2009 3:07 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
Tony,

I found your problem. The Kowalski program is trying to tell you the code is extending past address $FFFF.

Look at my example:
Code:
 .ORG $fffb
 
 LDA   $00   ; FFFB & FFFC
 STA   $01   ; FFFD & FFFE   

label .db  $02   ; FFFF
      .db  $03   ; 0000    


With the last line commented out, it assembles fine.

With the last line in, I get the same ERROR E020 message.

Check your .org statements to be sure you are placing things in the right location. Don't forget the space taken by the reset, IRQ, and NMI vectors.

Hope this helps

Daryl


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jun 07, 2009 8:47 am 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
Ah. The table was only 1k in the earlier iteration, and it is at F800. time to move it lower to $F000

(it was only the text and I had a separate attract mode table which I combined so this table went from 1k to 2k.)


Thanks!


*= $F000
;ScoreMessageWordsTable
.DB $00, $4E, $55, $4C, $4C, $00, $80, $00 ; $00 = NULL character
.DB $00, $00, $00, $00, $00, $00, $80, $00 ; $01 = Blank
.DB $00, $54, $45, $53, $54, $00, $80, $00 ; $02 = TEST
.DB $50, $41, $53, $53, $45, $53, $80, $00 ; $03 = PASSES
.DB $00, $46, $49, $52, $45, $00, $80, $00 ; $04 = FIRE
.DB $00, $42, $41, $4C, $4C, $00, $80, $00 ; $05 = BALL
.DB $00, $45, $56, $45, $4C, $00, $80, $00 ; $06 = EVEL
.DB $4B, $4E, $49, $56, $45, $4C, $80, $00 ; $07 = KNIVEL

_________________
"My biggest dream in life? Building black plywood Habitrails"


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 21, 2009 4:44 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
Nightmaretony wrote:
ERROR E020: Wrapped program counter.

At least Kowalski's assembler announces when the PC is wrapped. Many assemblers don't and emit useless code.

Nightmaretony wrote:
If I comment out the final 3 or so lines of the data table, it complies without a hitch.

Complies? :) I hate it when a program doesn't comply with the rules I establish. Makes me want to kick the computer. D'you mean "assembles?" :D

BTW, it would be cool if Mr. Kowalski decided to update his simulator to work with the '816 instruction set. Also, it would help if he would fix the non-standard syntax, such as using @ to indicate a binary radix (the MOS standard says use %), or not recognizing the correct manner of accumulator addressing (e.g., ASL A). Otherwise, it's a pretty good simulator, with only one obvious implementation anomaly. You'll see if it you assemble and execute the following code with the simulator running in 6502 (not 65C02) mode.

Code:
   clc
   sed
   lda #$99
   adc #$01
   cld
   brk


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jun 21, 2009 8:50 am 
Offline

Joined: Fri Jun 27, 2003 8:12 am
Posts: 618
Location: Meadowbrook
My other bug in there was in have 2 duplicated entries, so the table was 2 longer which is why the commented outs made it work.

Since I use 65C02 mode, I dont think I get that bug.

The other wierd bug I get is if I use the simulator and get to around 32m768 clock cycles or so. The entire program go boom. I now comment out my hardware gig and get to the routines dirtectly to get around that. Otherwise, tis working smoothly right now for me :D

_________________
"My biggest dream in life? Building black plywood Habitrails"


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 20 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: