Page 3 of 3

Re: Seamless All-direction Scrolling

Posted: Wed Aug 16, 2017 8:21 pm
by dougeff
[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.

Re: Seamless All-direction Scrolling

Posted: Wed Aug 16, 2017 10:54 pm
by Diskover
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

Re: Seamless All-direction Scrolling

Posted: Thu Aug 17, 2017 5:00 am
by dougeff
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.

Re: Seamless All-direction Scrolling

Posted: Thu Aug 17, 2017 9:52 am
by Diskover
dougeff 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.
Mmm, a little hard

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();
		}
*/
DrawBG.s
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
This still does not work correctly what is supposed to be corrected in CSV2NT_FULL?

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
};
EDIT 2:
It seems that there is a limit when creating METATILES for BACKGROUND

How can increase?

Re: Seamless All-direction Scrolling

Posted: Sat Sep 02, 2017 7:18 am
by Diskover
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 :D

Image Image

Re: Seamless All-direction Scrolling

Posted: Sat Sep 02, 2017 1:09 pm
by dougeff
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.

Re: Seamless All-direction Scrolling

Posted: Sat Sep 02, 2017 2:22 pm
by Diskover
Great!

Re: Seamless All-direction Scrolling

Posted: Sat Sep 09, 2017 12:44 pm
by Diskover
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

Re: Seamless All-direction Scrolling

Posted: Sat Sep 09, 2017 5:06 pm
by dougeff
Ok.

I'm assuming you are testing on a cartridge that can do 4 screen mirroring?

Re: Seamless All-direction Scrolling

Posted: Sun Sep 10, 2017 12:16 am
by Diskover
dougeff wrote:Ok.

I'm assuming you are testing on a cartridge that can do 4 screen mirroring?
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. :roll:

Re: Seamless All-direction Scrolling

Posted: Sun Sep 10, 2017 1:32 am
by thefox
FYI, I spotted some attribute problems (miscolored tiles) when trying that Star Wars demo.

Re: Seamless All-direction Scrolling

Posted: Sun Sep 10, 2017 3:50 am
by Diskover
Ok, I just made several attempts on different plates. A PCB Second Dimension is and the other is Retro-Stage.

Image

Image

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

Posted: Sun Sep 10, 2017 4:37 am
by tokumaru
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

Posted: Sun Sep 10, 2017 4:46 am
by Diskover
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.
Indeed, you're right. Even unsoldering H and V still did not work, therefore, these plates are not compatible with screen 4 mirror.

However, I tested with GTROM / Cheapocabras and if it works smoothly:

https://www.youtube.com/watch?v=MgiqSY10zzA