currently going ahead

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

User avatar
donato-zits-
Posts: 19
Joined: Fri Jun 03, 2022 11:14 am
Contact:

currently going ahead

Post by donato-zits- »

my days are going to be read(or try to read) the articles of NESDEV wiki and try to give a better order to where is better to put my atention, in the midle of this I try too to make a briefly and notes of the wiki, more or less like the char thata represent the father of Indiana Jones was done ^^ in another side I put on the PC and compiling the codes that I already got make to work in NESASM3 now in the CA65 assembler, like mucha of you know, this compilation toy is better way ..
in my first invest I passed away through points thata a do not understood, reasons sure I have, since thata are many the words( ex: timing, regardness, overlap, tick, dot, fetch, fill, offset, lach, further and more...) of the specific lexicon of each whriter, well like the word stuff of this knowedge. But o.k.,little by little I'm going filling the imcomplete spaces thata I have in the lexicon field of all this subject.
Currently I'm going ahead whit -very(?)- mucha better percentual of what I going understanding, hence I think soo thata when I arrive in the thata I stoped in the firts invest certily I got do whata I can't do before, it's basiclly bout algorithms of game dinamics: jump, enemy movements, colision betwen sprites..well, too mucha code that I do not "get to me" yet
ahh! and already thanks for all the frengers thata will give me some help or take alway of me some doubt in the future; they are coming...soo for now...this is it, we are going ahead!

edit: I forgot to mentioned thata I never try to read NESDEV wiki yet because my mind yet do not haved registred it like a book, in my firts study invest don't even know about the lexicon of the kind whriter I passed away, but certainly other focus I think so thata I have right now, this make diference too, for sure
Last edited by donato-zits- on Wed Jun 15, 2022 4:58 pm, edited 2 times in total.
https://mega.nz/folder/qSJVxIpI#Z9gtBdq8PCdaFzWxbRBLDA <<<<two weeks studing through nerdy nights, currently going ahead... 8-)
https://mega.nz/file/XapTCCiS#jBcf5oqDG ... M2sgnWv9OA my"compilingtryingrest" in NM
unregistered
Posts: 1289
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: currently going ahead

Post by unregistered »

I passed away through points thata a do not understood, reasons sure I have, since thata are many the words( ex: timing, regardness, overlap, tick, dot, fetch, fill, offset, lach, further and more...)
timing: time; is talking about passage of time; probably on the nesdev wiki, timing is referring to an instruction’s cycles used; each instruction takes a certain amount of cycles to complete its task

regardness: not a word… perhaps “regardless”?

overlap: if a sheet of paper overlaps a sign, that sign would be partly covered and may be hard to read

tick: the nesdev wiki uses “tick” to talk about one cycle being used… like a clock; game time passing

dot: (am unsure) ….oooh, maybe a pixel on the screen?

fetch: as in “please fetch me a glass of water”, the fetch is a synonym for get

fill: like when you fill a bucket with water; maybe talking about fill bytes in memory (give each byte a certain value)

offset: perhaps this word is pointing to a certain spot

latch: to connect something; maybe is referring to a latch where you need to set a certain bit in order for another bit to be changed? (am unsure)

further: as in “throw this ball further than that tree”, “further than” means “beyond”; or “furthermore” means “additionally”


When reading the nesdev wiki, it really helps to consult a dictionary. Many of the confusing words used, make tons of sense after learning their definitions; at least, a dictionary greatly helped me.

That wiki contains tons of GREAT NES info; great idea to try to read it. :)
User avatar
Quietust
Posts: 1850
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: currently going ahead

Post by Quietust »

unregistered wrote: Wed Jun 15, 2022 9:35 am dot: (am unsure) ….oooh, maybe a pixel on the screen?
The "PPU Scrolling" page mentions things happening on certain "dots", and in this case it's referring to PPU cycle numbers within a given scanline (of which the first 256 directly correspond to rendered pixels and the remaining 85 happen during horizontal blanking).
unregistered wrote: Wed Jun 15, 2022 9:35 am fill: like when you fill a bucket with water; maybe talking about fill bytes in memory (give each byte a certain value)
I'm guessing this is in the context of "filling the render pipeline", in which case it's talking about copying bytes of graphics data into part of the PPU's internal memory (specifically, a shift register whose output will send individual pixels to the screen).
unregistered wrote: Wed Jun 15, 2022 9:35 am offset: perhaps this word is pointing to a certain spot
In high-level languages we talk about array offsets, which are locations relative to some predefined starting point. In the context of the NES PPU, there are "scrolling offsets", which is basically like saying "starting from the rear-left corner of the room, take 2 steps forward and 3 steps to the right, then take a picture of the floor in front of you".
unregistered wrote: Wed Jun 15, 2022 9:35 am latch: to connect something; maybe is referring to a latch where you need to set a certain bit in order for another bit to be changed? (am unsure)
In digital electronics, the term "latch" is synonymous with "register", referring to a specific group of memory bits. In the PPU, there's a "VRAM address latch" which is updated when the CPU writes to memory locations $2005 and $2006, and that value is used by the PPU to determine the "window" through which it should draw the screen (since there's enough video memory space to fill the entire screen 4 times over, and you need to choose which screen to "start" at and how far you want to scroll toward the next screens).
Quietust, QMT Productions
P.S. If you don't get this note, let me know and I'll write you another.
User avatar
donato-zits-
Posts: 19
Joined: Fri Jun 03, 2022 11:14 am
Contact:

Re: currently going ahead

Post by donato-zits- »

unregistered wrote: Wed Jun 15, 2022 9:35 am


When reading the nesdev wiki, it really helps to consult a dictionary. Many of the confusing words used, make tons of sense after learning their definitions; at least, a dictionary greatly helped me.
hey you live in North Amérika(?), you do not need dictionary man...and thanks for the contextualisation you two! Quietust include thanks!
https://mega.nz/folder/qSJVxIpI#Z9gtBdq8PCdaFzWxbRBLDA <<<<two weeks studing through nerdy nights, currently going ahead... 8-)
https://mega.nz/file/XapTCCiS#jBcf5oqDG ... M2sgnWv9OA my"compilingtryingrest" in NM
User avatar
donato-zits-
Posts: 19
Joined: Fri Jun 03, 2022 11:14 am
Contact:

Re: currently going ahead

Post by donato-zits- »

reading the ALU topic I find the link carry, anda okis.. even already passing a look to the first pages of the 6502.tex inside-inside this docs I do not understood very well bout the carry flag works or about the details sigh flag funcion in the relative mode addr, but well..."more or less"(I will read again^^) I think so I get the idea, though...going ahead across the topic link bout carry, to understand better i find others topics thata contains info bout ALU general purpose( 2 others) I print thata material today but don't know if I have to read it now.
other barrier to me is thata two days ago I try to install CC65 in a windows7 system though...do not find the way to white the right 'path' variable. Someone for sure know how to do this here, can somebody show me the way to put my other computer in service to my learnig?
I think so thata will be good to do relate to who maybe try to give me some advice thata I'm reading anda trying to reading anda memorizing topics like registes anda a few others...in other words, I trying a little bit hard right now to learn bout anda do not will give up never, right...I do not know the idea principle of cause thata make I whrite this paragrafh but well, it's the true.
finally...the real questions thata stand to me right now:
--I'm puting my atentions in the right FCS programming thematic?
--I do not read yet about CC65 comands, is better tu put direction to this before?
--I trying to do the codes of this menber(?) of our NESDEV forum "make sense to my mind", is good to try this?
--affter all( anda more thata will going ahead) which is the more good or recommendable study order ?

fine.. you see thata I need recommendations or maybe not, don't know!
https://mega.nz/folder/qSJVxIpI#Z9gtBdq8PCdaFzWxbRBLDA <<<<two weeks studing through nerdy nights, currently going ahead... 8-)
https://mega.nz/file/XapTCCiS#jBcf5oqDG ... M2sgnWv9OA my"compilingtryingrest" in NM
unregistered
Posts: 1289
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: currently going ahead

Post by unregistered »

Why are you attempting to read NES info on Wikipedia? :) That is NOT a valid NES info site. And… searching NES items on a general/massive info site, like Wikipedia, is guaranteed to fail your attempted learning.


The Carry flag is one of the 5 valid 2A03 flags:

[Negative, Overflow, #Reserved, #Break, #Unused/Decimal, Interrupt, Zero, Carry]

Those flags fit into a byte, 1 byte==8 bits, so there are 3 unusable flags represented with a leading #. (i.e. The 6502’s Decimal flag was disabled in the NES’ 2A03.)


Each of the 5 useable flags/bits can either be set (1) or unset (0). The Carry flag’s value may be *guaranteed to change a result from either the next adc or sbc.


In mathematical addition we were taught to carry a column’s 10’s digit from the right column over to the left column by adding that digit to the left column. In the NES, when adding 16bit numbers, where each column encapsulates an 8bit value, the Carry flag is set (1) when a carry is needed to add a 1 to the left column.


In mathematical subtraction we were taught to attempt to carry 1 from the left column and at the same time add 10 to the right column, if the subtraction in the right column yields a negative number. In the NES, when subtracting 16bit numbers, the columns are set up the same way (each encapsulates 8bit values). In this 6502 subtraction, the Carry is unset (0) when a carry is needed to remove 1 from the left column.

During subtraction, the processor automatically seems to add 10 to the right column, if that would be necessary in our mathematical subtraction, (actually, the subtraction result is unsigned; so a negative result isn’t ever calculated [FINAL-EDIT]: but, if you are familiar with signed binary numbers, the unsigned result can be read/used as a valid signed binary number result if you want. The Masters Theses creation of signed/unsigned binary numbers are truly spectacular! :D[/FINAL-EDIT] ).


It’s easier to remember “set subtract, clear add” for coding sbc or adc;

since, the Carry flag must be set (1) to disable the subtraction from applying an extra -1 to the result;

and since, the Carry flag must be clear/unset (0) to disable the addition from applying an extra +1 to the result.


—-
*guarenteed: means that, both adc and sbc, each of them are enabled to change the value of the Carry flag after each use/instance… this functionality allows ”easy” addition and subtraction of multi-byte numbers (i.e. 16bit, 24bit, 32bit, etc.) to be performed with the 6502’s 8bit registers.
User avatar
donato-zits-
Posts: 19
Joined: Fri Jun 03, 2022 11:14 am
Contact:

Re: currently going ahead

Post by donato-zits- »

unregistered wrote: Tue Jul 12, 2022 2:00 pm Why are you attempting to read NES info on Wikipedia? :) That is NOT a valid NES info site. And… searching NES items on a general/massive info site, like Wikipedia, is guaranteed to fail your attempted learning.
well...I'm definitly no searching nothing, the links are there man :shock: . And... a FCS probe is FOREVER a probe, anda FCS results are EVER going out; bout fails... yes then can be one of the infinit goin outs of the true learnings, only another compile no good attemp is what I(U) supose to mean(?)
https://mega.nz/folder/qSJVxIpI#Z9gtBdq8PCdaFzWxbRBLDA <<<<two weeks studing through nerdy nights, currently going ahead... 8-)
https://mega.nz/file/XapTCCiS#jBcf5oqDG ... M2sgnWv9OA my"compilingtryingrest" in NM
unregistered
Posts: 1289
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: currently going ahead

Post by unregistered »

hmmm… your first two links point to Wikipedia.

Here is the first link’s url, for me at least:

https://en.wikipedia.org/wiki/Arithmeti ... _unit//url


Sry, I don’t understand your FCS comments; I never mentioned FCS.
User avatar
donato-zits-
Posts: 19
Joined: Fri Jun 03, 2022 11:14 am
Contact:

Re: currently going ahead

Post by donato-zits- »

ALU it's a thing to be understood is whata I think! Am I right? anda when someone read a link to understtod more about that in NESDEVwiki, this reader goes to there to know more from this...
bout the links...I try to put then right in the next oportunity, buta, by the way for now, its only take off the lasta "//url" thata go to the right going
FCS means to me FAMILY COMPUTER SYSTEM, "system" is not...let's mention ortodoxal, buta I get the habit to mentioned like this, I think so thata stand must beautifull whith this further
https://mega.nz/folder/qSJVxIpI#Z9gtBdq8PCdaFzWxbRBLDA <<<<two weeks studing through nerdy nights, currently going ahead... 8-)
https://mega.nz/file/XapTCCiS#jBcf5oqDG ... M2sgnWv9OA my"compilingtryingrest" in NM
unregistered
Posts: 1289
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: currently going ahead

Post by unregistered »

Yes, well sry about that //url… where did that come from. But anyway, regardless, those two WERE Wikipedia links, so that’s why I questioned your purpose with searching for NES info on Wikipedia. :)
User avatar
donato-zits-
Posts: 19
Joined: Fri Jun 03, 2022 11:14 am
Contact:

Re: currently going ahead

Post by donato-zits- »

charging two screens I got to make the scroll work fine! good, but going ahead follow the NN example the nametable data of my attempt are been geting wrong, I'm trying to fill the ppu whith four .nam archives, all then appear in the screen but fliped/tuned
Attachments
4scrensScro.nes
(24.02 KiB) Downloaded 9 times
2scrensScro.nes
(24.02 KiB) Downloaded 6 times
https://mega.nz/folder/qSJVxIpI#Z9gtBdq8PCdaFzWxbRBLDA <<<<two weeks studing through nerdy nights, currently going ahead... 8-)
https://mega.nz/file/XapTCCiS#jBcf5oqDG ... M2sgnWv9OA my"compilingtryingrest" in NM
unregistered
Posts: 1289
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: currently going ahead

Post by unregistered »

donato-zits- wrote: Thu Jul 28, 2022 12:46 pm I'm trying to fill the ppu whith four .nam archives, all then appear in the screen but fliped/tuned
Hmmm… I didn’t dl your ROMs bc I’m on cell phone and have no emulator on my phone; but,:

When you say flipped/tuned, you mean flipped/turned? If that’s the case, then maybe the flipping or turning of each background tile can be discovered in your sprite definitions?


I said sprite definitions bc some bits in each byte2 of sprite definitions allow each sprite tile to be flipped horizontally and/or vertically:

https://www.nesdev.org/wiki/PPU_OAM#Byte_2


OAM is there ONLY for sprites. :) [EDIT]It is possible to display some background with OAM. Some games have done that, but it’s kind of rare.[/EDIT] But, these are flipped background tiles? Can background tiles even be flipped?

Well, if you are trying to display background with sprites, please read this page:

https://www.nesdev.org/wiki/PPU_memory_map

Background should definitely be different from sprites. Sry I can’t look at your ROMs now.
Fiskbit
Posts: 486
Joined: Sat Nov 18, 2017 9:15 pm

Re: currently going ahead

Post by Fiskbit »

donato-zits- wrote: Thu Jul 28, 2022 12:46 pm charging two screens I got to make the scroll work fine! good, but going ahead follow the NN example the nametable data of my attempt are been geting wrong, I'm trying to fill the ppu whith four .nam archives, all then appear in the screen but fliped/tuned
This probably means your nametable data is stored horizontally (in rows), but you're writing it to the screen vertically (in columns, ie +32 mode in PPU register $2000). You either need to load 1 byte and then skip 31, or change your nametable data format to use columns.
User avatar
donato-zits-
Posts: 19
Joined: Fri Jun 03, 2022 11:14 am
Contact:

Re: currently going ahead

Post by donato-zits- »

now I'm trying to understand what sector of the code I have to change to do that...or how to change the nametable data to coluns in the NESst
edit: "to load 1 byte and then skip 31" means change the bit 2 of $2000 to 0(?) and what more?, that "what more" is what still yet seems up to me...
https://mega.nz/folder/qSJVxIpI#Z9gtBdq8PCdaFzWxbRBLDA <<<<two weeks studing through nerdy nights, currently going ahead... 8-)
https://mega.nz/file/XapTCCiS#jBcf5oqDG ... M2sgnWv9OA my"compilingtryingrest" in NM
unregistered
Posts: 1289
Joined: Thu Apr 23, 2009 11:21 pm
Location: cypress, texas

Re: currently going ahead

Post by unregistered »

donato-zits- wrote: Thu Jul 28, 2022 3:11 pm now I'm trying to understand what sector of the code I have to change to do that...or how to change the nametable data to coluns in the NESst
edit: "to load 1 byte and then skip 31" means change the bit 2 of $2000 to 0(?) and what more?, that "what more" is what still yet seems up to me...
Bit2 of $2000 changes how the PPU works:

0: PPU writes tiles horizontally. After each write to $2007 the PPU place to receive the next $2007 write increments by 1.

1: PPU writes the tiles received vertically to the screen in exactly the way you described in your edit (except that bit2 of $2000 would need to change to 1 to enable this). After each write to $2007 the PPU place to receive the next $2007 write increments by 32. Since NES screens are 32 tiles wide, the +32 cooks a vertical write.

Reference: https://www.nesdev.org/wiki/PPU_registers

[EDIT]Make sure to only adjust $2000 inside of vblank where the PPU is resting; resting from all of its outside of vblank work. ;)[/EDIT]


There’s nothing more to do after inverting bit2 of $2000; other than possibly adjusting your data reading appropriately.
Though, if the horizontal write is the problem, then your data-for-screen reading must already be set in a vertical manner; if so, then no need to adjust your data reading. :)


Notes:
a.) If the entire screen’s tiles are written horizontally by mistake, that does NOT flip or rotate any tile. The screen’s arrangement would just be confusing.

b.) Changing a screen’s display in NESst would be wrong bc you’d be rearranging a nice screen outside of the NES; that would probably slow the speed of your future NESst edits to that screen.
Post Reply