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:

Re: currently going ahead

Post by donato-zits- »

unregistered wrote: Sat Jul 30, 2022 8:31 am

[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]
in my scroll code try are 3 sections thata the $2000 can be ajusted, I try all the combinations to this anda do not got the expected roll effect
unregistered wrote: Sat Jul 30, 2022 8:31 am 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. :)
"your data-for-screen reading must already be set in a vertical manner"; do you mean a MoreorLessNew algoritm whits this, if yes show me this anda finish with the doubt
unregistered wrote: Sat Jul 30, 2022 8:31 am 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.
however they are appearing only flipped/turned, so the arrangemet of the data are in verticaly order(?)
unregistered wrote: Sat Jul 30, 2022 8:31 am 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.
I do not understood what you mean here man
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: Mon Aug 01, 2022 5:47 am
unregistered wrote: Sat Jul 30, 2022 8:31 am 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.
however they are appearing only flipped/turned, so the arrangemet of the data are in verticaly order(?)
If your data is written to $2007 in this manner:

Code: Select all

;each write to $2007 with a data
;(separated here with commas):
A, B, C, D, E, F, G, H, I
and bit2 of $2000 has already been set to 0 (enabling PPU to display tiles horizontally) in a vblank period, then your screen should display:

Code: Select all

ABCDEFGHI
OR, if that data is written while bit2 of $2000 is 1 (enabling your PPU to display tiles vertically), then your screen should display:

Code: Select all

A
B
C
D
E
F
G
H
I
Notice, that no tile has been turned/rotated or flipped. Again, bit2 of $2000 simply sets the PPU to display tiles, their tile numbers written to $2007, either horizontally or vertically.

donato-zits- wrote: Mon Aug 01, 2022 5:47 am
unregistered wrote: Sat Jul 30, 2022 8:31 am 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.
I do not understood what you mean here man
It seems to me, that if a correct screen is somewhat like:

Code: Select all

ABCDEFGBCDG
ABCDEFGBCDG
ABCDEFGBCDG
ABCDEFGBCDG
AND, you made edits to your screen in NESst (NES graphics program), to try and fix a data writing problem, THEN even if your screen somehow displays correctly, it may be difficult to make future adjustments to the original column of As. Because the As would probably be no longer be saved in a column. :)
User avatar
Quietust
Posts: 1850
Joined: Sun Sep 19, 2004 10:59 pm
Contact:

Re: currently going ahead

Post by Quietust »

unregistered wrote: Mon Aug 01, 2022 2:54 pm If your data is written to $2007 in this manner:

Code: Select all

;each write to $2007 with a data
;(separated here with commas):
A, B, C, D, E, F, G, H, I
and bit2 of $2000 has already been set to 0 (enabling PPU to display tiles horizontally) in a vblank period, then your screen should display:

Code: Select all

ABCDEFGHI
OR, if that data is written while bit2 of $2000 is 1 (enabling your PPU to display tiles vertically), then your screen should display:

Code: Select all

A
B
C
D
E
F
G
H
I
Notice, that no tile has been turned/rotated or flipped. Again, bit2 of $2000 simply sets the PPU to display tiles, their tile numbers written to $2007, either horizontally or vertically.
To be clear, $2000 bit 2 affects how the PPU increments the VRAM address after each write - it has absolutely no effect on how the PPU renders data that's already been written.
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- »

the algoritm gived like example in "advanced NN series #3" is not to a turnedOf bit2 of PPUctrl, NESdev wiki anotations do not give algoritms examples of how to fill PPU in his articles explanations, so all this stuff are not so clearly like should be, this is no good, NESdev wiki articles have some algoritms examples leastwise for this game dinamic?
obs: sorry for perhaps seems to be a some ironic whit thata word "leastwise" but I do not see too mucha concrete examples in NESdev wiki, this is cool to who is begining to develop to FCS? anyway forgive me, if is cool or not I like the way, anda do not understood yet is nice too, let says thata I am enjoying to be trying to discovery, at least...I'm studing all this stuff less than one year, but this time do not have nothing relating to the miss of examples or the place/typeofaccess of the knowledge fountains...righ?
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- »

the horizontal arrow direction is the order of the data thata is trying to be reading by the PPU, it's is arranged like $0000, $0001, $0003, $0004 in where the red arrow is indicating, the questions are: how can I generate a .nam archive in the order that green arrow is directionating(the vertical arrangemente? is NESst capable to generate a data like this?and finally...this nametables data maybe will proced to a correct/expected roll effect?

edit:right now I find a spanish language doc of "the shinny of nes scrolling"(from loppy) that should be one of the translations of hydesprojects made by hyde, aparently seems to help but tell no new info or give concrete example, anyway is a RARE doc because is in latin language
Attachments
dfgdd.png
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: Mon Aug 01, 2022 7:28 pm the horizontal arrow direction is the order of the data thata is trying to be reading by the PPU, it's is arranged like $0000, $0001, $0003, $0004 in where the red arrow is indicating, the questions are: how can I generate a .nam archive in the order that green arrow is directionating(the vertical arrangemente? is NESst capable to generate a data like this?
Hmmm… I’m not certain, but I don’t believe a .nam file can be included inside a NES ROM, or game. It seems that .nam files are just there to allow you to build a screen in a visual sense. My sister spent days converting each .nam into data, .db statements. (We use metatiles.) Then, it just depends on a.) how you read and then write that data to $2007 and b.) how your PPU has been set to either increment the VRAM address, by 1 or by 32, after each $2007 write.

Quietust’s post above explains this VRAM address.


[EDITS] Furthermore, is isn’t possible to save a nametable written vertically, bc the horizontal nametable can be written horizontally (set bit2 of $2000 to 0 in a vblank, before you write to $2007 i.e.

Code: Select all

lda #%10000001
sta $2000
sets PPU in a manner for vblank, *don’t ever make bit6 a 1*, 8x8 sprites, Background and Sprite tiles are both drawn with the first pattern table, VRAM address is incremented by 1 after each $2007 write, drawing on nametable1).

And, sure, if your screen data is presented in a vertical manner AND you write to $2007 in a vertical manner AND your PPU has been set to increment the VRAM address by 32 after each $2007 write, then that’s cool too.

https://www.nesdev.org/wiki/PPU_registers#PPUCTRL [/EDITS]


donato-zits- wrote: Mon Aug 01, 2022 7:28 pmand finally...this nametables data maybe will proced to a correct/expected roll effect?

edit:right now I find a spanish language doc of "the shinny of nes scrolling"(from loppy) that should be one of the translations of hydesprojects made by hyde, aparently seems to help but tell no new info or give concrete example, anyway is a RARE doc because is in latin language
By “roll effect”, do you mean scrolling? Maybe tomorrow I can post you some specific pages to read in my long thread; tokumaru, tepples, and others did present super helpful excellent scrolling advice to me in that thread of mine. Though, scrolling is definitely NOT just copying an algorithm. It requires a deeper understanding of some parts of the NES.

Note: I’ve been taught that Horizontal scrolling is much easier than Horizontal and Vertical scrolling.
Last edited by unregistered on Tue Aug 02, 2022 11:03 pm, edited 7 times in total.
User avatar
Gilbert
Posts: 504
Joined: Sun Dec 12, 2010 10:27 pm
Location: Hong Kong
Contact:

Re: currently going ahead

Post by Gilbert »

unregistered wrote: Tue Aug 02, 2022 9:55 pm Hmmm… I’m not certain, but I don’t believe a .nam file can be included inside a NES ROM, or game. It seems that .nam files are just there to allow you to build a screen in a visual sense. My sister spent days converting each .nam into data, .db statements. (We use metatiles.) Then, it just depends on a.) how you read and then write that data to $2007 and b.) how your PPU has been set to either increment the VRAM address, by 1 or by 32, after each $2007 write.
Most assemblers allow you to insert binary files in the ROM, so you can just insert a name table file directly and there is no need to tediously write all those .db lines (even then, it should not be that difficult to have a whatever (Python, etc.) script to convert a binary file into a series of .dbs).
For example, in my demo I just did this (I use ASM6 for the assembler):

Code: Select all

;PRG Bank 2 (data, fixed)  
  .base $C000
pal:        ;palettes
  .incbin "loom1.pal"
  .incbin "loom2a.pal"  
t_pal:
  .incbin "loomt2.pal"
  .incbin "loomt.pal"
nt1:        ;name tables
  .incbin "loom2a.nam"
nt2:
  .incbin "loom2b.nam"
nt3:
  .incbin "loomt1.nam"
nt4:
  .incbin "loomt2.nam"
Of course, in case you need compressed data in the ROM you can also insert compressed data files directly, as long as the game programme is able to decompress them.
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 Aug 02, 2022 9:55 pm
By “roll effect”, do you mean scrolling? Maybe tomorrow I can post you some specific pages to read in my long thread; tokumaru, tepples, and others did present super helpful excellent scrolling advice to me in that thread of mine. Though, scrolling is definitely NOT just copying an algorithm. It requires a deeper understanding of some parts of the NES.

Note: I’ve been taught that Horizontal scrolling is much easier than Horizontal and Vertical scrolling.
I means "rolls royce effect" whit this man ^^, offy course scrolling o.k.threads?yes they are good BUT do not are books,
I do not like mucha to read nothing that I do not transform in books; concerning to:"not just copying an algorithm"...everyone knows that man and a depper understanding requires see or whrite a good example/code orrr...we have the other ways: a.)make another version of an algorithm already gived or b.)whrite one from the "deepin understanding", in othes words, the same thata mencioned before
And 'bout the easy or hardy, this or another stuff.. I will digit to you thata you and me will forever(or not forever if we
have a limit anda a good human sense) find more and more easy or hardy stuffy in the way and ever will find someone
better or with more time, dedication or possibilitys than us, with codes or any kind of beautyfull stuffys

note: I find this roll royce topic too, is good to "read" about, right?
Edit: thanks again for your atention until now man, gilbert include
Last edited by donato-zits- on Fri Aug 05, 2022 1:16 pm, edited 1 time 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
User avatar
donato-zits-
Posts: 19
Joined: Fri Jun 03, 2022 11:14 am
Contact:

Re: currently going ahead

Post by donato-zits- »

almost done...the second bit of $2000 haved even to set off, but like can be seeing in the rom, unexpected effects yet have to be cuted off
note: the crazy vertical scroll not called was funny ^^
edit: some ajusts right now but yet no perfect
edit2:another discovery anda now almost done are true words ^^
Attachments
4scrensScro-edit2-.nes
(24.02 KiB) Downloaded 4 times
4scrensScro-edit-.nes
(24.02 KiB) Downloaded 4 times
4scrensScro.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
Post Reply