Jump to content



1

32 character text display


60 replies to this topic

#51 eshu OFFLINE  

eshu

    Chopper Commander

  • 163 posts

Posted Mon May 16, 2011 9:45 AM

View Poststephena, on Mon May 16, 2011 9:41 AM, said:

View Posteshu, on Mon May 16, 2011 8:48 AM, said:

Incidentally stella was allowing me extra copies by hitting RESP0 on cycle 76/0 since it was generating a start signal when they appear on the next scanline showing all 3 copies - this doesn't seem to happen on real hardware - I need to double check it doesn't happen with say a cycle 75 strobe, but I think it's unlikely.
This is a corner case that isn't handled properly in Stella yet. Can you provide a test ROM that illustrates what you're seeing (ie, one that specifically shows that Stella is different than real hardware)?

You could use 36char.bin which I posted earlier in this thread - it shows 36 chars in stella, but not on real hardware :( :P

#52 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 20,922 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Mon May 16, 2011 9:59 AM

View Posteshu, on Mon May 16, 2011 8:48 AM, said:

Edit: There you go RT, changed the font for you :P
Thanks. Looks good.

#53 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,545 posts
  • Location:Georgia, USA

Posted Mon May 16, 2011 11:01 AM

View Posteshu, on Mon May 16, 2011 8:48 AM, said:

View Postcd-w, on Mon May 16, 2011 8:30 AM, said:

It looks like you are hitting RESP0 three times per scanline: once to position on the left, and then twice to get a further two (x3) copies on the right?

Chris

Yes pretty much, The first RESP0 is hit at the very end of the scanline (cycle 76/0), which allows me to use HMOVE to adjust it's position before it appears (I don't think I've seen this done with the RESPx trick before) - I realise If I hit the final one a bit later I should be able to get extra copies, I think the timing is too tight to use them as I need to HMOVE and strobe RESP0 around the end of a scanline so it's quite busy. I need to look at it properly but wanted to nail 32 chars first.

Incidentally stella was allowing me extra copies by hitting RESP0 on cycle 76/0 since it was generating a start signal when they appear on the next scanline showing all 3 copies - this doesn't seem to happen on real hardware - I need to double check it doesn't happen with say a cycle 75 strobe, but I think it's unlikely.
Strobing RESP0 and HMOVE together are done all the time when positioning sprites. ;) Just because you're strobing RESP0 at the end of the line doesn't really make it a special case. :)

To get 36 characters I believe you will need to strobe RESP0 four times-- once at the beginning of the (visible) line to get the first three copies, then twice on the right side of the screen to get the last three copies, then one more time at the end of the line to set up for the next line. This is because if you strobe RESP0 and the reset does *not* occur while a START signal is active for one of the extra copies, you will not get the main copy until 228 cycles later-- usually stated as "on the next line," but that's potentially misleading, because if you strobe RESP0 at the very end of a line (i.e., on cycle 74), such that player0 would be positioned at screen location 2, "on the next line" could be misinterpreted to mean "after an HBLANK has occurred," but it doesn't-- the sprite's position counter must count through all 160 of its values so the END state (which resets the counter normally) can trigger a START signal.

Apparently Stella is not checking the actual count, just checking the line number or something like that to see if an HBLANK has occurred after strobing RESP0.

When you strobe RESP0 at the end of the line to set up for the next line, you must position the main copy at the right side of the screen so the near copy will be wrapped around to the left side of the screen at the spot where you want to RESP0 again to get the main copy for the first three copies.

Michael

#54 eshu OFFLINE  

eshu

    Chopper Commander

  • 163 posts

Posted Mon May 16, 2011 11:55 AM

View PostSeaGtGruff, on Mon May 16, 2011 11:01 AM, said:

To get 36 characters I believe you will need to strobe RESP0 four times

I'm strobing it twice with 6 cycle separation for the last three copies, if I strobe it with 11 cycle separation I get four copies...

#55 Omegamatrix OFFLINE  

Omegamatrix

    River Patroller

  • 4,796 posts
  • Location:Oh, Canada

Posted Mon May 16, 2011 1:33 PM

I tried it on my Harmony and it looked great on my CRT TV. Well done!


32char.jpg

#56 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,545 posts
  • Location:Georgia, USA

Posted Mon May 16, 2011 1:53 PM

View Posteshu, on Mon May 16, 2011 11:55 AM, said:

View PostSeaGtGruff, on Mon May 16, 2011 11:01 AM, said:

To get 36 characters I believe you will need to strobe RESP0 four times

I'm strobing it twice with 6 cycle separation for the last three copies, if I strobe it with 11 cycle separation I get four copies...
Line 1:
Start with a cycle 71 RESP0. This will reset the main copy of player0 to position 150, and the near copy will be at position 6.
After HBLANK, do a cycle 23 RESP0. This will reset the main copy of player0 to position 6, so the reset will coincide with the START signal of the near copy.
This will give you the first three sprites.
After loading and drawing the player1 graphics, do a cycle 49 RESP0 followed by a cycle 55 RESP0 to get the last three copies of player0.

Line 2:
Right after that, do a cycle 74 RESP0. This will reset the main copy of player0 to position 159, and the near copy will be at position 15.
After HBLANK, do a cycle 26 RESP0. This will reset the main copy of player0 to position 15, so the reset will coincide with the START signal of the near copy.
After loading and drawing the player1 graphics, do a cycle 52 RESP0 followed by a cycle 58 RESP0 to get the last three copies of player0.

Line 3:
Right after that, do a cycle 71 RESP0 and repeat the process.

The "touchy" part is the cycle 58 RESP0 followed by the cycle 71 RESP0:

cycles 49, 50, 51 = STA RESP0
cycles 52, 53, 54 = sleep 3 = ^^^^-7654 (not drawn)
cycles 55, 56, 57 = STA RESP0 = 3210---ss (not drawn)
cycles 58, 59, 60, 61, 62 = sleep 5 = ^^^^-76543210--
cycles 63, 64, 65, 66,67 = sleep 5 = -ssss-76543210-
cycles 68, 69, 70 = STA RESP0 = --ssss765
cycles 71, 72, 73 = sleep 3 = ^^^^-7654 (not drawn)

I'm not sure if the third copy will continue to be drawn during the reset signal-- if it does, there's a good chance that only 7 pixels will be drawn, since the last pixel will fall within the new "count 0." But if I'm not mistaken, the last bit will always be blank, anyway, so no harm no foul. In any case, you should at least be able to get 35 characters, if not 36.

The other situation-- a cycle 55 RESP0 followed by a cycle 74 RESP0-- shouldn't be a problem.

You could also add 1 to all of these cycle numbers:

cycle 72 RESP0, cycle 24 RESP0, cycle 50 RESP0, cycle 56 RESP0
cycle 75 RESP0, cycle 27 RESP0, cycle 53 RESP0, cycle 59 RESP0
cycle 72 RESP0, etc.

This still presents the same "sticky" situation with the cycle 59 RESP0 and cycle 72 RESP0, but I don't know which numbers will work out better for your code.

Michael

PS -- In all the screenshots of the 32-character display, it looks like there's room for only one more character to the left, and one more character to the right, or 34 characters max? I guess that might be due to HMOVE bars? If that's the case, you will probably need to go with the second set of numbers.

Edited by SeaGtGruff, Mon May 16, 2011 1:59 PM.


#57 SpiceWare OFFLINE  

SpiceWare

    Quadrunner

  • 5,990 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sun May 20, 2012 2:55 PM

View Posteshu, on Mon May 16, 2011 7:09 AM, said:

Here's a quick test before I clean it up - this should be 32 characters well spaced and in the centre of the screen:

This is quite impressive - are there any spacing issues, or could it be used to display a 128x200 bitmap?

#58 SvOlli OFFLINE  

SvOlli

    Space Invader

  • 38 posts
  • Location:Hannover, Germany

Posted Mon May 21, 2012 2:26 PM

View PostSpiceWare, on Sun May 20, 2012 2:55 PM, said:

This is quite impressive - are there any spacing issues, or could it be used to display a 128x200 bitmap?
Because of the interlace used shouldn't the question be: "could it be used to display a 128x100 bitmap?"

#59 SpiceWare OFFLINE  

SpiceWare

    Quadrunner

  • 5,990 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Mon May 21, 2012 2:44 PM

The way he's using it is 128x100, but you can put out different images for the odd and even scan lines - just like how PAL is 625 and not 312.

One of my initial Harmony demos was 96x200, it could easily be adapted to 128x200.


#60 eshu OFFLINE  

eshu

    Chopper Commander

  • 163 posts

Posted Mon May 21, 2012 6:22 PM

View PostSpiceWare, on Sun May 20, 2012 2:55 PM, said:

View Posteshu, on Mon May 16, 2011 7:09 AM, said:

Here's a quick test before I clean it up - this should be 32 characters well spaced and in the centre of the screen:

This is quite impressive - are there any spacing issues, or could it be used to display a 128x200 bitmap?

Unfortunately there are some spacing issues - Three player objects (6 characters) are 1-pixel out of place for a bitmap display on every other scanline. With the cycles gained by using DPC+ it would probably be possible to fill the gaps with missiles or the ball, like I did in another thread which was based on similar techniques - http://www.atariage....maps-with-dpc/.

I'm pretty sure with bus stuffing (http://www.atariage....e-the-graduate/) it should be possible to do a full screen (160x200) interlace display.

#61 SpiceWare OFFLINE  

SpiceWare

    Quadrunner

  • 5,990 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Mon May 21, 2012 8:07 PM

View Posteshu, on Mon May 21, 2012 6:22 PM, said:

Unfortunately there are some spacing issues - Three player objects (6 characters) are 1-pixel out of place for a bitmap display on every other scanline.

Bummer. I hacked the font and removed the ASLs (as they were hiding the overlapped pixels) to see where the issue occurs.
32charnew2.bin.png

Quote

With the cycles gained by using DPC+ it would probably be possible to fill the gaps with missiles or the ball
Hmm - tricky part would be that the missiles are going to be triple copied just like the sprites. The only arrangement I can see that might make it possible would be to put the ball in the first gap and a missile for the 2nd and 3rd. I suspect the 3rd copy of the missile could be hidden by the playfield.

Quote

I'm pretty sure with bus stuffing (http://www.atariage....e-the-graduate/) it should be possible to do a full screen (160x200) interlace display.
Yeah, the bus stuffing's pretty clever. I find it interesting that The Graduate is basically the same concept as the Harmony/Melody cartridge - a computer, plugged into the cartridge port, that works in tandem with the 6507 to make the 2600 do things it could not do on it's own.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users