It is currently Sat Feb 17, 2018 6:36 pm

All times are UTC - 7 hours



Search found 270 matches
Search these results:

Author Message

 Forum: Newbie Help Center   Topic: Playing with division routine

Posted: Wed Apr 13, 2016 7:05 am 

Replies: 15
Views: 2207


Thanks for the help - but this routine still gives me unexpected results. Again, to test, I just directly fed it values, and immediately read the return values after the division routine in debugger. Here are my test results: Input: Dividend:1 Divisor:1 Expected Result: Quotient:00 Quotiont+1: 01 Ac...

 Forum: Newbie Help Center   Topic: Playing with division routine

Posted: Tue Apr 12, 2016 9:50 am 

Replies: 15
Views: 2207


tokumaru - I have now just made a routine to test the 8-bit divide routine exactly as is just to see what I get as a result. it is verbatim the routine in the wiki. I feed it 1 as a dividend and 2 as a divisor. Then I debug read the x and y values. The result is the same as it was in my customizatio...

 Forum: Newbie Help Center   Topic: Playing with division routine

Posted: Tue Apr 12, 2016 8:50 am 

Replies: 15
Views: 2207


I pulled straight from here: http://wiki.nesdev.com/w/index.php/8-bit_Divide The only thing that's different is that rather than pushing Res and ResHi to x and y at the end, I just leave them as is. I know that's not the issue, but even just in case, in coming back from the routine, I debugged for t...

 Forum: Newbie Help Center   Topic: Playing with division routine

Posted: Tue Apr 12, 2016 8:36 am 

Replies: 15
Views: 2207


Hey all - just trying to get Bregalad's division routine to work for one of my purposes. If you're unfamiliar, it is: ;8-bit divide ;by Bregalad ;Enter with A = Dividend, Y=Divisor ;Output with YX = (A/Y) << 8, A = remainder Division sta Dvd ;Stores dividend sty Dvs ;Stores divisor ldy #$00 sty ResH...

 Forum: Newbie Help Center   Topic: Writing attributes

 Post subject: Writing attributes
Posted: Sun Mar 13, 2016 10:42 am 

Replies: 2
Views: 748


So, in each instance I have been writing attribute data, it has been part of my nametable routines. I completely get the concept of the bit pairs assigning the attribute data to the 4 quadrants, so to speak. My question is - how exactly do I *just* write new attribute data? I just haven't had to do ...

 Forum: Newbie Help Center   Topic: object position to tile address?

Posted: Fri Mar 04, 2016 10:54 am 

Replies: 15
Views: 1893


So I noticed a small bug with this and am hoping you guys can help me simplify. I've noticed that in a few cases, the tile to change isn't normalized to my collision grid, but after tinkering, I want it to be. So my get-tile-collision routine looks generally like: LDA tileY ;; a y value to check AND...

 Forum: Homebrew Projects   Topic: Long-term goal: a Metal Gear-like game for NES

Posted: Mon Feb 22, 2016 8:12 am 

Replies: 18
Views: 3765


Wow - I'm glad to hear the project helped someone get started! Yes, there are many more to come. Some we will be just getting out there, some will be part of a bigger project that also comes with our in house tools we used, etc. I'm certainly not the best ASM programmer, but I think I can help teach...

 Forum: Newbie Help Center   Topic: object position to tile address?

Posted: Fri Feb 19, 2016 12:34 pm 

Replies: 15
Views: 1893


You guys rock. Yep, it's all working as anticipated. Really appreciate all the quick responses. Definitely helps keep morale going.

 Forum: Newbie Help Center   Topic: object position to tile address?

Posted: Fri Feb 19, 2016 12:11 pm 

Replies: 15
Views: 1893


Eureka! Victory :-)

Thanks for the patience. I think I will end up having to normalize it to the collision grid (simple enough...just LSR it down one level than ASL it back up) but now the part that was stumping me is working as flawlessly as far as I can tell!

 Forum: Newbie Help Center   Topic: object position to tile address?

Posted: Fri Feb 19, 2016 12:02 pm 

Replies: 15
Views: 1893


Gotcha. I see some of the mistakes now, yes. This is *close* to working, but still off. What I have now is: LDA ObjX LSR a LSR a LSR a STA temp LDA ObjY LSR a LSR a LSR a LSR a LSR a LSR a ORA #$20 ;; as per your suggestion STA tileAddressHi ASL a ASL a AND #%11100000 ORA temp STA tileAddressLo Anyt...

 Forum: Newbie Help Center   Topic: object position to tile address?

Posted: Fri Feb 19, 2016 10:13 am 

Replies: 15
Views: 1893


Tepples - I'm confused. In this example, you're starting with yTileNumber and xTileNumber - in this example, were these values correlating to 16px x 16px meta tile grid (like what I use for collision)? My goal is to essentially figure out the tile address correlating to the position of a moving obje...

 Forum: Newbie Help Center   Topic: object position to tile address?

Posted: Fri Feb 19, 2016 9:28 am 

Replies: 15
Views: 1893


Tepples - thanks - actually, not looking for the tile associated with the address, just literally looking for the 16bit address that corresponds to a screen coordinate of an object. I have collision data in RAM, taking up 240 bytes, and that's easy to get (being one byte...using math to get row+colu...

 Forum: Newbie Help Center   Topic: object position to tile address?

Posted: Fri Feb 19, 2016 7:56 am 

Replies: 15
Views: 1893


Hey guys - what do you recommend as the most efficient way to get the sixteen bit tile address for an object's coordinates. Obviously, I'm doing something similar with background collision (split up into 16x16 blocks rather than 8x8 in this case), so I can conceive of a general method, but I suppose...

 Forum: Newbie Help Center   Topic: What is bcs *+4 in ASM6?

Posted: Mon Jan 18, 2016 12:30 pm 

Replies: 6
Views: 1172


Thanks for the clarification, guys. I was able to decode and do it with labels in ASM6 just fine, but it's good to have the knowledge :-)

 Forum: Newbie Help Center   Topic: What is bcs *+4 in ASM6?

Posted: Mon Jan 18, 2016 9:39 am 

Replies: 6
Views: 1172


Perfect, got it! Thanks :-)
Sort by:  
Page 7 of 18 [ Search found 270 matches ]


All times are UTC - 7 hours


Jump to:  
Powered by phpBB® Forum Software © phpBB Group