Seamless All-direction Scrolling
Moderator: Moderators
Re: Seamless All-direction Scrolling
[Re, 1 direction scrolling]
Maybe next time. I'm very busy these days.
Also, you can use the all-direction engine to just go horizontally (keep Y at zero, or in the 2 nametable tall range)...or vertically (keep X zero, ot in the 2 nametable wide range)...with slight modification.
And stop calling the "fill the ppu buffer" for the opposite direction, and change the mirroring in the .cfg file, if you want.
Maybe next time. I'm very busy these days.
Also, you can use the all-direction engine to just go horizontally (keep Y at zero, or in the 2 nametable tall range)...or vertically (keep X zero, ot in the 2 nametable wide range)...with slight modification.
And stop calling the "fill the ppu buffer" for the opposite direction, and change the mirroring in the .cfg file, if you want.
nesdoug.com -- blog/tutorial on programming for the NES
Re: Seamless All-direction Scrolling
Yes, I was testing things yesterday.
I managed to run from left to right and from right to left by setting the mirror to horizontal in.cgf, and in lesson28.h the MAX_SCROLLING_Y to 0. This enabled the screen to lock up and down.
However, when I move, there comes a moment on the screen number 4-5 that begin to appear glicht graphics and gives problems.
In addition, it really seems that the nametables are loaded two by two vertically, and although BGTABLE only left, for example, 9 nametables, these were loaded from top to bottom.
I do not know if I understand the last one I've written. I am sorry
I managed to run from left to right and from right to left by setting the mirror to horizontal in.cgf, and in lesson28.h the MAX_SCROLLING_Y to 0. This enabled the screen to lock up and down.
However, when I move, there comes a moment on the screen number 4-5 that begin to appear glicht graphics and gives problems.
In addition, it really seems that the nametables are loaded two by two vertically, and although BGTABLE only left, for example, 9 nametables, these were loaded from top to bottom.
I do not know if I understand the last one I've written. I am sorry
Re: Seamless All-direction Scrolling
Hmm, maybe there's some bugs in the code.
I will look at it ...some day.
EDIT - I didn't have any problems, when I changed #define ROOMS_HIGH 1
(essentially the same as MAX_SCROLL_Y 0)
I didn't change the .cfg mirroring. I don't think that should be the problem either. Or, maybe that is the problem...yes...it does load 2 rooms tall worth of tiles when you scroll left and right... You would need to go to DrawBG.s and in _CSV2NT_COL_FILL: at line 280 it should just do...
lda #$ff
sta _Col_Buffer+62
jmp Col_Ready
to skip the second half of the 'Draw a column' function.
And, shouldn't it be vertical mirroring? To do horizontal scrolling? It's too early in the morning, I need some coffee.
EDIT 2 - still see some graphic errors. Looks like there is bugs in the code.
EDIT 3 - I think the problem then, is the CSV2NT_ROW_FILL function is being called, and it shouldn't be. I commented out refereces in lesson28.c on lines 292 and 301, and edited CSV2NT_FULL to do 1 fewer row. Seems to work.
I will look at it ...some day.
EDIT - I didn't have any problems, when I changed #define ROOMS_HIGH 1
(essentially the same as MAX_SCROLL_Y 0)
I didn't change the .cfg mirroring. I don't think that should be the problem either. Or, maybe that is the problem...yes...it does load 2 rooms tall worth of tiles when you scroll left and right... You would need to go to DrawBG.s and in _CSV2NT_COL_FILL: at line 280 it should just do...
lda #$ff
sta _Col_Buffer+62
jmp Col_Ready
to skip the second half of the 'Draw a column' function.
And, shouldn't it be vertical mirroring? To do horizontal scrolling? It's too early in the morning, I need some coffee.
EDIT 2 - still see some graphic errors. Looks like there is bugs in the code.
EDIT 3 - I think the problem then, is the CSV2NT_ROW_FILL function is being called, and it shouldn't be. I commented out refereces in lesson28.c on lines 292 and 301, and edited CSV2NT_FULL to do 1 fewer row. Seems to work.
nesdoug.com -- blog/tutorial on programming for the NES
Re: Seamless All-direction Scrolling
Mmm, a little harddougeff wrote:Hmm, maybe there's some bugs in the code.
I will look at it ...some day.
EDIT - I didn't have any problems, when I changed #define ROOMS_HIGH 1
(essentially the same as MAX_SCROLL_Y 0)
I didn't change the .cfg mirroring. I don't think that should be the problem either. Or, maybe that is the problem...yes...it does load 2 rooms tall worth of tiles when you scroll left and right... You would need to go to DrawBG.s and in _CSV2NT_COL_FILL: at line 280 it should just do...
lda #$ff
sta _Col_Buffer+62
jmp Col_Ready
to skip the second half of the 'Draw a column' function.
And, shouldn't it be vertical mirroring? To do horizontal scrolling? It's too early in the morning, I need some coffee.
EDIT 2 - still see some graphic errors. Looks like there is bugs in the code.
EDIT 3 - I think the problem then, is the CSV2NT_ROW_FILL function is being called, and it shouldn't be. I commented out refereces in lesson28.c on lines 292 and 301, and edited CSV2NT_FULL to do 1 fewer row. Seems to work.
My config:
lesson28.h
#define ROOMS_HIGH 1
#define MAX_SCROLL_Y 0
.cgf
NES_MIRRORING: type = weak, value = 1;
lesson28.c
Commented lines and remains so, but this is not whether it is right, because then nothing moves.
Code: Select all
/*
if (direction == GoRight){
tempX = masterX + 0x100;
tempY = masterY;
CSV2NT_COL_FILL();
}
else {
tempX = masterX - 0x10;
tempY = masterY;
CSV2NT_COL_FILL();
}
*/
Add these lines at position 280
Code: Select all
;62
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;next column, nametable down one
inc _tempY+1
lda #$ff
sta _Col_Buffer+62
jmp Col_Ready
EDIT:
In addition, change the BGtable to make a single row and I think that is where there really a problem. As they have nothing to load down errors occur.
Code: Select all
const unsigned char * const BG_TABLE[] = {
BG00, BG01, BG02, BG03, BG04, BG05, BG06, BG07
};
It seems that there is a limit when creating METATILES for BACKGROUND
How can increase?
Re: Seamless All-direction Scrolling
I've been testing your scroll engine and good. . . can be reached has to make a Star Wars - The Return of the Jedi who never left hahaha
- Attachments
-
- Star Wars - The Return of the Jedi (alpha 0.1).nes
- (40.02 KiB) Downloaded 175 times
Re: Seamless All-direction Scrolling
I'm glad someone can make sense of my code. I've been too busy to write a proper blog page. Or comment the code.
I'm definitely going to change the code, ...and make a H scroll only and a V scroll only version of the same.
I'm definitely going to change the code, ...and make a H scroll only and a V scroll only version of the same.
nesdoug.com -- blog/tutorial on programming for the NES
Re: Seamless All-direction Scrolling
I regret to report that the engine 4 nametable scroll does not work properly in PAL NES version.
https://www.youtube.com/watch?v=Qc0p-Gv7LzI
https://www.youtube.com/watch?v=Qc0p-Gv7LzI
Re: Seamless All-direction Scrolling
Ok.
I'm assuming you are testing on a cartridge that can do 4 screen mirroring?
I'm assuming you are testing on a cartridge that can do 4 screen mirroring?
nesdoug.com -- blog/tutorial on programming for the NES
Re: Seamless All-direction Scrolling
No. I'm testing on a flashcard but now that you mention it will test a PCB compatible with 4 nametable and I said something.dougeff wrote:Ok.
I'm assuming you are testing on a cartridge that can do 4 screen mirroring?
Re: Seamless All-direction Scrolling
FYI, I spotted some attribute problems (miscolored tiles) when trying that Star Wars demo.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
Re: Seamless All-direction Scrolling
Ok, I just made several attempts on different plates. A PCB Second Dimension is and the other is Retro-Stage.
Previously, I tried an ordinary rom to verify that both plates were functioning properly. In this case, I used the Super Mario Bros. rom and everything went well.
Then I tried SW-RotJ rom. I soldered V and H. In both cases the effects were the same. Can these plates are incompatible with 4 screen?
https://www.youtube.com/watch?v=Zj8wDVlfi3Y
As you can see, the result is different. Besides making a wrong scroll, blink several metatiles across the screen.
Previously, I tried an ordinary rom to verify that both plates were functioning properly. In this case, I used the Super Mario Bros. rom and everything went well.
Then I tried SW-RotJ rom. I soldered V and H. In both cases the effects were the same. Can these plates are incompatible with 4 screen?
https://www.youtube.com/watch?v=Zj8wDVlfi3Y
As you can see, the result is different. Besides making a wrong scroll, blink several metatiles across the screen.
Re: Seamless All-direction Scrolling
None of these boards support 4-screen name table layout. If you're soldering H and V tabs, that means you're using mirroring, and 4-screen is precisely the lack of mirroring.
Re: Seamless All-direction Scrolling
Indeed, you're right. Even unsoldering H and V still did not work, therefore, these plates are not compatible with screen 4 mirror.tokumaru wrote:None of these boards support 4-screen name table layout. If you're soldering H and V tabs, that means you're using mirroring, and 4-screen is precisely the lack of mirroring.
However, I tested with GTROM / Cheapocabras and if it works smoothly:
https://www.youtube.com/watch?v=MgiqSY10zzA