It is currently Tue Nov 21, 2017 4:20 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue Aug 22, 2017 2:26 pm 
Offline

Joined: Sat Jan 09, 2016 5:30 pm
Posts: 10
After the following subroutine is called:
Code:
EnableHUD:
   lda #$C0
   sta $C000
   sta $C001
   sta $E001
   rts


There is no split scrolling. The HUD should start on row 192 on screen. The HUD starts on row 192 of the bottom left nametable (0x2800). The game has 4-screen scrolling.

Here is the NMI routine:
Code:
NMI:
   lda #$08
   sta $2006
   lda #$00
   sta $2005
   sta $2005
   sta $2006
   rti


And the IRQ routine:
Code:
Interrupt:
   rti


Top
 Profile  
 
PostPosted: Tue Aug 22, 2017 4:08 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10117
Location: Rio de Janeiro - Brazil
The NMI handler is supposed to set the scroll for the gameplay window, using $2000 and $2005 ($2006 should only be used for setting the scroll mid-screen), and the IRQ handler is supposed to set the scroll for the status bar, using $2005 and $2006.

Also keep an eye on the I (interrupt inhibit) flag, which must be cleared so that IRQs can fire. Note that you can't CLI inside the NMI handler, because when NMIs and IRQs fire, the status flags (including I) are automatically saved on the stack and restored when you RTI, so whatever you do with these flags inside the NMI and IRQ handlers is lost when you RTI.


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

All times are UTC - 7 hours


Who is online

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