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: 47
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
unregistered
Posts: 1318
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: 1920
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: 47
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?
User avatar
donato-zits-
Posts: 47
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
unregistered
Posts: 1318
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: 564
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: 47
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.
User avatar
donato-zits-
Posts: 47
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 52 times
4scrensScro-edit-.nes
(24.02 KiB) Downloaded 49 times
4scrensScro.nes
(24.02 KiB) Downloaded 49 times
User avatar
donato-zits-
Posts: 47
Joined: Fri Jun 03, 2022 11:14 am
Contact:

Re: currently going ahead

Post by donato-zits- »

Continuing with my studies I got a good progress with animations, but...need a hand for something that even trying across diferent ways I do not manage to make work, this is the code in use:

Code: Select all

ReadDown: 
  LDA $4016      
  AND #%00000001  
  BEQ ReadDownDone


  LDA #$34
  STA PlayerHeadTile
  
  LDA #$44                      ;when this point of start tile is load in the down directional comand....
  STA Player_body_Tile                                 ;(to make a up/down move animation)
  
  
  INC player_bodyY 
  INC Player_headY

  LDA #$01
  STA isWalking
ReadDownDone:

;----------------------------------------------this is the algorithm for the animations-------------------------------------------------------

CheckWalkcircle:
   LDA isWalking
   BEQ notwalking
   DEC isWalking
   
   INC anim_CycleCounter          ;...this timer do not make effect 
   LDA anim_CycleCounter
   CMP #WalkCycleTimer
   BNE +
   LDA #$00
   STA anim_CycleCounter
   
   LDA Player_body_Tile   ; here the EOR to put the tile in other hexnumber 
   EOR #$01
   STA Player_body_Tile
   
 +  
notwalking:
   RTS
The question is...what do I have to change?

UPDATE: the animation trouble persist but today I got one more great progres right nows!!load zone with colisions
UPDATE2:animations trouble solved, and now I will hide my lasts progress here because a little game is getting form...if someone download good, but maybe is not finish yet
Attachments
laranjespace(or maybe other title for the game....nes
(40.02 KiB) Downloaded 42 times
laranjSpace_loadzones with colision!.nes
(24.02 KiB) Downloaded 51 times
laranjSpace.nes
(24.02 KiB) Downloaded 50 times
User avatar
donato-zits-
Posts: 47
Joined: Fri Jun 03, 2022 11:14 am
Contact:

Re: currently going ahead

Post by donato-zits- »

today I got to do the CHR RAM appears and then make the CHR ROM reappears generating a binary .rom archive of 49kbs, a great amount of algoritms to understand and learn in the way to bring the advantages of that and make the path until my purpose, the MMC1; but the the one-try progress of today makes me feel good, but not too that that trial don't to be begin very cool, is good to be learning too... for sure!
User avatar
donato-zits-
Posts: 47
Joined: Fri Jun 03, 2022 11:14 am
Contact:

Re: currently going ahead

Post by donato-zits- »

Think so that I got!
Attachments
Sem título.png
Post Reply