Atarigmr Posted April 20, 2012 Share Posted April 20, 2012 I have been playing around with 7800 coding for sometime now... But I noticed that my program (testing mode 160x4) doesn't produce the same results in of two emulators I have tried it on, Prosystem and MESS. On Prosystem transparency is not working, the pixels show black, but on MESS they are transparent. I was thinking I would like to have sprites coming from outside the visible area (scrolling in), from the right side it is easy, but what about the left side as 0 is the first visible position, I thought of having a smaller visible area and cover the sides and then this would work but what if I want to use the whole visible area and have no black areas on the sides what would be the best approach? The program I am working on at the moment needs to display preferably 256 lines, but I can go with 240, is this possible?, thus I am aiming at the PAL A7800 (although I would prefer the NTSC palette). BUT this 240 lines show well on Prosystem emu but not on MESS as it only shows 226 lines (PAL) and when I tried the NTSC I noticed that it shows 225, which is odd, just one line more in PAL?! At the moment I have my dll, dl's and sprites and tiles all working but I am having this problems mentioned above and I will stop for now waiting for your insights on these issues as perhaps I am just wasting my time working with emus. (unfortunately I don't have the real hardware.) Thanks Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 20, 2012 Share Posted April 20, 2012 I know a bit of 7800 hardware but there's plenty of experts around that can give more accurate info. Emulation isn't really exact, but AFAIK Prosystem should do a better job in most regards than the others. Horizontal positioning - you can have objects that start left of the visible display. There's wraparound from 255-0. So, e.g. put a 32 colour-clock object in position 240, the first 16 pixels are offscreen, the last 16 appear at the left of the visible display. Screen height - from the info I have, you are limited to 242 NTSC or 292 in PAL. The remainder are overscan and can't be accessed. The old way of thinking was to only use 192 scanlines, in reality you could use more like 224. To be sure it's onscreen, centre it within the visible area on the system you're developing for (Pal or Ntsc). Quote Link to comment Share on other sites More sharing options...
Atarigmr Posted April 20, 2012 Author Share Posted April 20, 2012 Thank you Rybags. Great to know about the wraparound at position 240, that'll solve things So MESS is not correct in showing only 226 line in PAL... I wonder about the transparency discrepancy I am getting on these emus. Quote Link to comment Share on other sites More sharing options...
Atarigmr Posted April 20, 2012 Author Share Posted April 20, 2012 BTW I have been doing gfx stuff by hand( not to bad because it was just for testing purposes and thus nothing complex) and also started to code a PC program to help with that but I'd rather not reinvent the wheel as time is something that we all lack - is there any programs to convert gfx from PC formats to a7800 format? Quote Link to comment Share on other sites More sharing options...
Rybags Posted April 20, 2012 Share Posted April 20, 2012 Not sure - since the nature of objects is that they're read backwards with each scanline 256 bytes away from the last, you can just use a 256 pixel wide BMP and strip the header off it. Wraparound is 255... the 240 was just an example. Quote Link to comment Share on other sites More sharing options...
PacManPlus Posted April 20, 2012 Share Posted April 20, 2012 The transparency issue is an odd one. In 320B mode (320x2), if transparency is enabled you lose the first color of the palette (i.e. it's transparent). Being that you only have two palettes to work with, that means you only have 4 colors. If transparency is off, you gain that first color back (so you have all three colors per available palette, or 6 in total. With 160x4 (160B?) mode, you use the first four palettes for colors, but color 0 in each palette is still transparent. For example: If an object is defined in 160x4 mode and you are using palette 0, you would set the colors: Palette 0 Color 1 Palette 0 Color 2 Palette 0 Color 3 Palette 1 Color 1 Palette 1 Color 2 Palette 1 Color 3 Palette 2 Color 1 Palette 2 Color 2 Palette 2 Color 3 Palette 3 Color 1 Palette 3 Color 2 Palette 3 Color 3 So in all reality you have 12 colors to work with (because color 0 of each palette is always transparent). Also, make sure you have the 'transparency on' bit set in the Control Variable. (I don't have the Maria Documentation handy or I'd tell you which bit it is). I know transparency works correctly in 160x4 mode, as I am working on a game currently that uses it. What version of ProSystem are you working with? Bob Quote Link to comment Share on other sites More sharing options...
Atarigmr Posted April 20, 2012 Author Share Posted April 20, 2012 @ Rybags thx for clarifying @PacManPlus Thanks, of course it had to be me doing something wrong, what I did in my haste to test transparency, I just put the high nibble to 0, which of course is wrong, I should have cleared bits 7,6,3 and 2 of the byte to have the first pixel transparent... dah Now, with a playing area so huge, I hope I will have enough cycles free for the game logic and music Quote Link to comment Share on other sites More sharing options...
EricBall Posted April 20, 2012 Share Posted April 20, 2012 The number of lines displayed is dependent upon the display list list. For NTSC the total number of lines in the display list list must be >= 243 (262-19), while for PAL it must be >= 293 (312-19). However, some of those display list list entries may point to a display list which only contains the 2 byte end of display list entry, in which case nothing is displayed on the number of lines given in the display list list entry. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.