+atari2600land Posted May 9 Share Posted May 9 Can I do a horizontal scroll in CV Basic? Nothing fancy, just moving the screen left and repeating the pixels over and over again. I can't find anything in the manual about how to scroll. In INTY Basic, there is a SCROLL function. Is there anything similar here? Quote Link to comment Share on other sites More sharing options...
Pixelboy Posted May 9 Share Posted May 9 Doing smooth scrolling on the intellivision: Call the SCROLL function in IntyBasic. Doing smooth scrolling on the ColecoVision: Sweat, tears, sleepless nights. 1 2 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted May 9 Share Posted May 9 Since nanochess implemented flicker mitigation I was thinking of moving sprites around like props to fake scrolling. Quote Link to comment Share on other sites More sharing options...
artrag Posted May 9 Share Posted May 9 No hw support for scrolling on the tms9918. You need to implement a sw solution. Quote Link to comment Share on other sites More sharing options...
Jess Ragan Posted May 9 Share Posted May 9 It's like trying to do smooth scaling on the Sega Genesis... you just can't do it. But you can fake it! There are games with subtle tricks that will make you THINK you're getting fast, smooth scrolling out of the machine. Imagic's Nova Strike is a great example. Only a small portion of the screen scrolls... most everything else is static, giving you a convincing illusion of movement and a convincing illusion of parallax to boot! It's all about fooling the eye with these old game systems. What they can't do, you replace with sleight of hand. See also the waterfalls on Sonic 2 for the Genesis, which LOOK for all the world like they're transparent, except they're not... every other pixel of the fall is drawn, giving you the impression on a CRT screen that the waterfall is in fact transparent. Playing the game on a LCD screen pulls the curtain back and reveals how the trick is done, but it still looks pretty sharp regardless. Quote Link to comment Share on other sites More sharing options...
+nanochess Posted May 9 Share Posted May 9 This is an example of scrolling the whole screen or part of the screen. This depends on having the data already in ROM. scrolling.bas scrolling.bmp scrolling.rom 1 Quote Link to comment Share on other sites More sharing options...
Pixelboy Posted May 10 Share Posted May 10 12 hours ago, Jess Ragan said: Imagic's Nova Strike is a great example. Nova Blast, actually. Quote Link to comment Share on other sites More sharing options...
Jess Ragan Posted May 10 Share Posted May 10 Right, right. Sorry for the mix-up. Quote Link to comment Share on other sites More sharing options...
artrag Posted May 10 Share Posted May 10 there is much more than Nova Blast Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted May 11 Author Share Posted May 11 I got simple scrolling in the game. Thanks to nanochess for giving us a peek at how to code scrolling for Colecovision. 2 Quote Link to comment Share on other sites More sharing options...
drfloyd Posted May 11 Share Posted May 11 12 hours ago, artrag said: there is much more than Nova Blast is it possible because of the SGM and extra RAM, we agree ? Quote Link to comment Share on other sites More sharing options...
artrag Posted May 11 Share Posted May 11 No, you do not need the extra ram for this. The scrolling would work on a plain machine. The ram is used to unpack the compressed level data in ram. But it could also work with uncompressed data in rom. Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted May 11 Share Posted May 11 10 hours ago, atari2600land said: I got simple scrolling in the game. Thanks to nanochess for giving us a peek at how to code scrolling for Colecovision. Hope a Coleco ZYX is brewing. I really dig the style! Quote Link to comment Share on other sites More sharing options...
artrag Posted May 13 Share Posted May 13 (edited) On 5/11/2024 at 8:15 AM, drfloyd said: is it possible because of the SGM and extra RAM, we agree ? I've done a small sample for you as well. A bit larger than Nano's one and (I think) without tearing (try the rom in a plain Colecovision and let me know). If you want to try your own picture follow these steps: 1. Edit ScrollTest.bmp adding your own image in the first 256x192 quarter of the picture (top left) - NOTE the code is scrolling only the lower 256x64 part. 2. Copy the same image in the top right quarter of the picture 3. Copy the first half of the image (512x192) on the lower part of the image with an offset of 4 pixels 4. run tmscolor -z -t -b -o result.bmp ScrollTest.bmp ScrollTest.bas - NOTE1 small errors due to color bleeding could be acceptable, it depends on the case. NOTE2 make sure that the total tile count is <=255 5. copy this code in ScrollTest.bas just after the second DEFINE command, replacing the SCREEN command generated by tmscolor ' replace the SCREEN command in the stub generate by TMSCOLOR SCREEN image_pattern,0,0,32,24,64 #X = 0 WHILE 1 WAIT if (#X and 1) then SCREEN image_pattern,#X/2+64*8,256,32,16,64 else SCREEN image_pattern,#X/2+64*8+64*24,256,32,16,64 end if IF CONT.RIGHT THEN #X = (#X + 1) and 63 IF CONT.LEFT THEN #X = (#X - 1) and 63 WEND 6. run the compiler by cvbasic ScrollTest.bas output.asm 7. run the assembler gasm80 output.asm -o output.rom 8. run output.rom, use the RIGHT and LEFT to move the screen Enjoy ScrollTest.bmp ScrollTest.bas output.rom Edited May 13 by artrag 1 Quote Link to comment Share on other sites More sharing options...
artrag Posted May 13 Share Posted May 13 (edited) The explanation for this technique is this: All the tiled used for in the scrolling for the different offsets (in the example just 2, but the image works also with 4 offsets), should fit in the tileset (256 tiles) In the sample used color bleeding occurs in few points, it can be acceptable or not, depends on the cases. Level design should avoid that the number of tiles passes the limit of 256 and color bleed. For each offset you need to define a separate level map. Here there are two level maps, one on top of the other, at offset 64*24. According to the value of the the map coordinate, you choose which level map has to be used has origin of the data to be copied by SCREEN Advanced technique Due to the fact we consider only horizontal scrolling, you could have 3 different tile banks of 256 tiles each specialised for the area of the screen to be rendered. This increases the variety of tiles and tile combinations that can be supported and can be achieved with the simple tool tmscolor. The solution is to cut the source image with the whole level in 3 stripes of height 64 pixels. For each of them, generate the offset images as above. You will end with 3 images (one per bank) with 2 (or 4) offsets each. Use tmscolor to generate the tile definitions of each bank and DEFINE VRAM PLETTER address,length,label to load the 3 banks in VRAM For each offset, assemble the data of the 3 PNTs (one per bank) in a single map. Use SCREEN as above on the assembled map Edited May 13 by artrag Quote Link to comment Share on other sites More sharing options...
artrag Posted May 13 Share Posted May 13 (edited) ScrollTest.basoutput.rombuild.batScrollTest.bmp The files in attach show the same idea as above, BUT with 4 offsets. The movement is 2 pixels at time, much smoother. The used tiles are 225, and I've removed the color bleeding manually in the intermediate frames. As above, the code is very easy: Quote MODE 0 DEFINE CHAR PLETTER 0,225,image_char DEFINE COLOR PLETTER 0,225,image_color SCREEN image_pattern,0,0,32,16,64 #X = 0 WHILE 1 WAIT SCREEN image_pattern,#X/4+64*8+64*16*((#X) and 3),256,32,16,64 IF CONT.RIGHT THEN #X = (#X + 1) and 127 IF CONT.LEFT THEN #X = (#X - 1) and 127 WEND There are 4 level maps stacked in the image_pattern data, each is 64x16 and is representing a given offset The correct map is chosen according to the offset (#X and 3) at position #X/4 If you want to try your own image, note that the code is scrolling a 256x64 area, so this time I've cropped the first third of the screen in ScrollTest.bmp 1. Edit ScrollTest.bmp adding your own image 256x64 in the first quarter of the picture (top left) - NOTE the code is scrolling only the lower 256x64 part. 2. Copy the same image in the top right quarter of the picture 3. Copy the first half of the image (512x64) on the lower part of the image 3 times with an offset of 2 pixels 4. run tmscolor -z -t -b -o result.bmp ScrollTest.bmp ScrollTest.bas - NOTE1 small errors due to color bleeding could be acceptable, it depends on the case, edit the image if you do not like them. NOTE2 make sure that the total tile count is <=255 5. copy the code above in ScrollTest.bas just after the second DEFINE command, replacing the SCREEN command generated by tmscolor Compile, assemble and run Enjoy! Edited May 13 by artrag 1 Quote Link to comment Share on other sites More sharing options...
artrag Posted May 13 Share Posted May 13 (edited) This time the scroll area is 32x19 characters output.romColor spill with horizontal scrolling.xlsxbuild.batScrollTest.bmpScrollTest.basresult.bmp Edited May 13 by artrag 1 1 Quote Link to comment Share on other sites More sharing options...
+nanochess Posted May 14 Share Posted May 14 11 hours ago, artrag said: This time the scroll area is 32x19 characters output.rom 7.89 kB · 1 download Color spill with horizontal scrolling.xlsx 49.08 kB · 0 downloads build.bat 142 B · 0 downloads ScrollTest.bmp 325.05 kB · 0 downloads ScrollTest.bas 34.17 kB · 0 downloads result.bmp 972.05 kB · 0 downloads Now that's an amazing piece of code! Well done! 👏 1 Quote Link to comment Share on other sites More sharing options...
artrag Posted May 19 Share Posted May 19 (edited) This time the scrolling is supported in 8 directions on a screen 32x23 (the first line is left for scorebar) Same ideas as before ScrollTest4D.bmp output.rom SampleScrollTest4D.bas build4d.bat Edited May 19 by artrag 1 1 Quote Link to comment Share on other sites More sharing options...
artrag Posted May 19 Share Posted May 19 Sorry, the ROM above was for msx1, this is for Colecovision output.rom 1 Quote Link to comment Share on other sites More sharing options...
skywaffle Posted September 22 Share Posted September 22 Is there any easy way to shift the characters a direction on the display easily? I was thinking there must be a way to accomplish this quickly using the SCREEN command since it can push ROM or RAM data so quickly to the screen, but I haven't managed to get the command to point to VRAM successfully. A nested FOR/LOOP to VPOKE adjacent characters works, however it is fairly sluggish. Quote Link to comment Share on other sites More sharing options...
artrag Posted September 22 Share Posted September 22 (edited) What do you need to do exactly? Shift characters or scroll the screen? Edited September 22 by artrag Quote Link to comment Share on other sites More sharing options...
skywaffle Posted September 22 Share Posted September 22 Well, I want to scroll the screen, but am not concerned about per pixel smooth scrolling. I'd like to shift all the characters on the screen in one direction, while building a new strip of characters on the edge of the screen, similar to how you'd accomplish scrolling more than 8 pixels on the Intellivision. Quote Link to comment Share on other sites More sharing options...
artrag Posted September 22 Share Posted September 22 (edited) The best solution is to copy the whole screen from a larger area in rom. Use SCREEN for that. You cannot copy the screen on itself one step away and then add a column. It would take more than one frame and give visible artifacts. Edited September 22 by artrag Quote Link to comment Share on other sites More sharing options...
artrag Posted September 22 Share Posted September 22 (edited) If you have enough ram, build the page in ram and move all the 768 tiles in one frame using SCREEN. The other possibility is use two PNTs in vram. Build the next frame in one table while showing the other one. Once done, swap the two PNTs and continue with the next frame. Edited September 22 by artrag 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.