Tiles Bank in sc2 or sc4 (Development MSX Forum)MSX Resource Center               
              
English Nederlands Espa�ol Portugu�s Russian         
 News
   Frontpage
  News archive
  News topics

 Resources
   MSX Forum
  Articles
  Reviews
  Fair reports
  Photo shoots
  Fairs and meetings
  Polls
  Links
  Search

 Software
   Downloads
  Webshop

 MRC
   Who we are
  Join our team
  Donate
  Policies
  Contact us
  Link to Us
  Statistics

 Search
 
  

  

 Login
 

Username

Password




Don't you have an account yet? Become an MSX-friend and register an account now!.


 Statistics
 

There are 54 guests and 3 MSX friends online

You are an anonymous user.
 

MSX Forum


MSX Forum

Development - Tiles Bank in sc2 or sc4

Goto page ( 1 | 2 Next Page )
Author

Tiles Bank in sc2 or sc4

PingPong
msx master
Posts: 1025
Posted: August 15 2008, 11:58   
Hi,

I've a question about the different "bank" of tiles used in screen 2 or screen 4

in these screen modes the area is splitted into three regions upper,middle,bottom. Each of these is 32x8 wide. So there are 256 possible charaters. The attribute/pattern table describe all of those 256 charaters. Because each region have it's own name table/charater/attribute table no problem at all. This arrangement make possible to address each pixel in a indipendent way.

On msx2 the displayed area can be 212 in height and the screen page area is 256.
From the vdp point of view a screen is 256x256 pixel wide, with a viewport of 256x192 or 256x212 pixels.

Problems come out if i want to take advantage of screen 4 and i have a 256x256 pixel screen area, what is unclear to me is:

a) the vdp does not have a fourth "bank" of tiles for coordinates between 193 and 255, so probably is uses the bottom area. That is the 3 bank is 512 charathers wide instead of 256 and have only 256 definable patterns -> cannot have individual pixels addressable. This third area is "asymmetric" if compared with bank top and middle.
b) the vdp have a fourth area. I think is not possible the pattern and attributes table will need 8192 bytes instead of 6144.

I think the truth is (a). But i'm not sure. Can anyone confirm this?

Thx.
Jipe
msx freak
Posts: 205
Posted: August 15 2008, 12:51   
mode 256 x 212 is only on screen 5 , 6 , 7 and 8
PingPong
msx master
Posts: 1025
Posted: August 15 2008, 13:24   
Quote:

mode 256 x 212 is only on screen 5 , 6 , 7 and 8


only in basic. No one prevent us to set the appropriate vdp register to achieve 212 lines on sc0-sc4.
The question is: once we have a little larger area how are arranged the tile banks?
sjoerd
msx addict
Posts: 450
Posted: August 15 2008, 14:25   
b
wolf_
online

msx legend
Posts: 4780
Posted: August 15 2008, 14:53   
Space Manbow uses 4 tilebanks, afaik, but when keeping in mind that it scrolls vertically, it only makes sense.

E.g. scrolling 4 tiles down means you see:

.
.
.
.
---
.
.
.
.
.
.
.
.
---
.
.
.
.
.
.
.
.
---
.
.
.
.

So, there *must* be 4 banks..
Jipe
msx freak
Posts: 205
Posted: August 15 2008, 14:57   
change vdp(10)=128 just change position of point (0,0) but don't change the height of screen2 and screen 4 in basic
always 192 : why is not the same in z80 machine code ??

PingPong
msx master
Posts: 1025
Posted: August 15 2008, 17:15   
Quote:

Space Manbow uses 4 tilebanks, afaik, but when keeping in mind that it scrolls vertically, it only makes sense.
So, there *must* be 4 banks..


I've tryed to fill the first three banks with same patterns+attribute data, effectively i can see the same patterns in all charather screen-

I also think there are a lot of collisions, however.
Normally the pattern table is from 0 to 6144
If we have 4 banks those table reach from 0 to 8191 overlapping name table+sprite attribute table.
The same problem also apply to the color table, overlapping sprite pattern info, probably i need to relocate those tables, but i'm not sure can work.

the new layout should be
0-8191 pattern table (4 banks)
8192-16383 color attributes

sat e spt will be moved outside the first 16KB.... and also nametable...



Anyone have already tryed?
sjoerd
msx addict
Posts: 450
Posted: August 15 2008, 17:36   
You can put the tabels anywhere you want within some restrictions.
PingPong
msx master
Posts: 1025
Posted: August 15 2008, 19:28   
Quote:

You can put the tabels anywhere you want within some restrictions.


Yes, i know, thanks, what i suspect is that the fourth bank is not working. but wolf told me that space manbow uses it.... so....
GhostwriterP
msx addict
Posts: 313
Posted: August 15 2008, 20:21   
You can use the 'mirror' bits to set several combinations. Like all the same as the first, or 1st same as 2nd + 3th same as 4th, and some other.
Space manbow has an actual game area screen height of 180 pixels witch saves 192-180 = 12 lines to update name table (hence 1 tile 8 lines heigh). So theoreticaly manbow could be using only the first three sets (by using Reg 23). And Manbow's vertical scroll is done in exactly the same way they scroll horizontally. So long story short I think wolf is wrong... at least this time.
wolf_
online

msx legend
Posts: 4780
Posted: August 15 2008, 20:29   
hmmmz, well I have my sources.. but, I shall investigate an punish the guilty ones..
PingPong
msx master
Posts: 1025
Posted: August 15 2008, 20:34   
Quote:

You can use the 'mirror' bits to set several combinations. Like all the same as the first, or 1st same as 2nd + 3th same as 4th, and some other.
Space manbow has an actual game area screen height of 180 pixels witch saves 192-180 = 12 lines to update name table (hence 1 tile 8 lines heigh). So theoreticaly manbow could be using only the first three sets (by using Reg 23). And Manbow's vertical scroll is done in exactly the same way they scroll horizontally. So long story short I think wolf is wrong... at least this time.


@GhostwriterP: emh, no. I think i was not able to explain my idea:
i do not want some mirroring. I want ALL four bank independent.


wolf_
online

msx legend
Posts: 4780
Posted: August 15 2008, 21:39   
Ok, whether SM uses them or not, there are 4 banks in sc4!
sjoerd
msx addict
Posts: 450
Posted: August 15 2008, 21:41   
Quote:

Quote:

You can put the tabels anywhere you want within some restrictions.


Yes, i know, thanks, what i suspect is that the fourth bank is not working. but wolf told me that space manbow uses it.... so....

Why do you suspect it won't work? It does work. Trust me

You can just try it in basic. set screen 2, scroll up the screen, and vpoke whatever you need to see it already works the way you want.
sjoerd
msx addict
Posts: 450
Posted: August 15 2008, 21:44   
Quote:

change vdp(10)=128 just change position of point (0,0) but don't change the height of screen2 and screen 4 in basic
always 192 : why is not the same in z80 machine code ??

when you do vdp(10)=128, basic does not know the height has changed. basic will never use those extra lines, but you can use vpoke to use them.
 
Goto page ( 1 | 2 Next Page )
 







(c) 1994 - 2008 MSX Resource Center Foundation. MSX is a trademark of MSX Licensing Corporation.