souvik1997 wrote:
I did add a,1 and sub 1 because I thought inc and dec do not affect the carry flag. :/
Oh wow, carry is indeed not affected. Good job! And for that I looked at the z80 instruction manual; I think that benryves has finally gotten his good points through my head.
Ughhh.... My key press detection code doesn't work.
(from the main menu)

Code:

MenuInput:
   ld a,$FE
   out (1),a
   nop
   nop
   in a,(1)
   cp $FD
   jr z,MenuKeyPressed_Left
   cp $FB
   jr z,MenuKeyPressed_Right
   ld a,$BF
   out (1),a
   nop
   nop
   in a,(1)
   cp $DF
   jr z,MenuKeyPressed_2nd
   jr nz,MenuInput

I _think_ all of the groups and masks for direct input are correct, so I don't know what's causing the problem. Sad
Well, your final jr nz should just be a jr; if the line above that did not jump, then the z flag must be reset. That is not a correctness fix, though. I checked your key groups/codes; they're all correct. Sad Can we see MenuKeyPressed_Left and _Right?
Sure.

Code:

MenuKeyPressed_Left:
   ld hl,TempStorage
   ld a,(hl)
   sub 1
   call c,ResetMenuChoice
   ld (hl),a
   jr MenuInput
ResetMenuChoice:
   ld a,3
   ret
MenuKeyPressed_Right:
   ld hl,TempStorage
   ld a,(hl)
   inc a
   cp 4
   call z,ResetMenuChoice2
   ld (hl),a
   jr MenuInput
ResetMenuChoice2:
   ld a,0
   ret
MenuKeyPressed_2nd:
   call QuickLCDClear
   jr LetTheGamesBegin
MenuInput doesn't redraw the main menu.
*epic super gigantic facepalm*
Thanks.
souvik1997 wrote:
*epic super gigantic facepalm*
Thanks.
Any time. Smile I hope this fixes things so we can see epic animated main menuness.
The menu's fixed now except for starting the game and the Help image, which is shifted by one bit to the right. Hopefully, after I get this done, I can work more on multiplayer. Smile
YESYESYESYES!!!!!!!!!!!!
This is awesome! I can't wait for some screenshots, and as I'm sure I've repeated many times, I would be happy to help you solve any bugs that are slowing down development. Smile Great job!
The menu's finally finished! Very Happy But, I can't seem to figure out why LetTheGamesBegin is crashing. :/
http://dl.dropbox.com/u/3601919/CnShoote.asm
Your whole main menu thing is very confusing. Sad It looks like you cut out all of the previous main menu code, but it's still there. Because of the way you cut it out, it looks like you don't call Cn2_Setup. Try moving the jp MainMenu after Start: to right after ld ($890F),a ;show debug info, then delete from Start_FindCalcsRedraw to ugh, this is a mess, it doesn't look like you're handling any of the calculator finding during the main menu...
So, I would put call MainMenu in Start_FindCalcsRedraw, and delete the jp MainMenu after Start?
souvik1997 wrote:
So, I would put call MainMenu in Start_FindCalcsRedraw, and delete the jp MainMenu after Start?
Well, you shouldn't be calling MainMenu anywhere, because that cuts out all of the existing code that does negotiation of finding other calculators while the main menu is active. Ideally you should thread your main menu rendering code into the existing main menu code.
Would this work? http://www.rafb.me/results/ESmlRl55.html
souvik1997 wrote:
That's a good start, but on lines 95/97 you're still jumping over all the initialization code.
Those lines are meant to quit the program. Razz
souvik1997 wrote:
Those lines are meant to quit the program. Razz
You double-spaced when you rafb.me'd:


Code:
95 Start:   
96
97    jp MainMenu
Ok, I fixed that. Maybe the code's crashing because I'm testing it with only one calculator...
souvik1997 wrote:
Ok, I fixed that. Maybe the code's crashing because I'm testing it with only one calculator...
No, it was crashing because you were trying to use CALCnet without having had the cn2_setup call executed, I believe. If you can't figure out what's going wrong, I'll take a look later and see if I can't make your main menu code play nice with the menu template I gave you.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
» Goto page Previous  1, 2, 3 ... , 26, 27, 28  Next
» View previous topic :: View next topic  
Page 27 of 28
» All times are UTC - 5 Hours
 
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 vote in polls in this forum

 

Advertisement