Jump to content

nanochess

+AtariAge Subscriber
  • Posts

    6,948
  • Joined

  • Last visited

  • Days Won

    21

nanochess last won the day on October 27 2022

nanochess had the most liked content!

About nanochess

  • Birthday November 4

Profile Information

  • Custom Status
    Coding something good
  • Gender
    Male
  • Location
    Mexico City
  • Interests
    MSX, Colecovision, Atari VCS/2600, Intellivision, Sega Master System, TI-99/4A, NES.
  • Currently Playing
    Mr. Chess for Intellivision ;)
  • Playing Next
    I should make something new! ;)

Recent Profile Visitors

52,862 profile views

nanochess's Achievements

Quadrunner

Quadrunner (9/9)

7.6k

Reputation

  1. That's a hyper-complicated one. I'll try to explain it easily 1. You need your map in two versions: tiled 8x8, and displaced 4 pixels vertically (I don't think you can get any smoother than that) 2. You need to pass both through TMSColor, using tiling mode, and make sure both can coexist in the bitmap definitions (for example, one using 48 tiles and the other 60 tiles, not exceeding 256 tiles minus any tile you need to display letters and digits, etc) 3. The VDP has exactly one extra kilobyte of VRAM unused, where you can build a hidden screen buffer. Lets call this variable 'hidden_screen'. 4. When hidden_screen is zero, you build your level in the $1800-$1aff area using the SCREEN statement (see Camelot Knights) 5. When hidden_screen is one, you build your level in the $1c00-$1eff area using the SCREEN statement (plus 1024 in the target offset). 6. Just after the WAIT statement you switch screens off using this: [code] WAIT REM Switch visual screen IF hidden_screen = 0 THEN hidden_screen = 1 ASM LD BC,$0602 ASM CALL WRTVDP ELSE hidden_screen = 0 ASM LD BC,$0702 ASM CALL WRTVDP END IF [/code] 7. Alternatively if you don't mind tearing, you could build your screen on the display screen without any screen switching code (forgetting steps 4, 5 and 6). Notice you can build the background in two frames (two WAIT statements), switching the screen in the first frame (the first WAIT statement).
  2. All the basics are there, but I was too lazy to draw a better background, add bonuses and extra weapons.
  3. I forgot completely that I don't have written a manual for TMSColor. In case of doubt, you can run any of my programs without arguments, and some will show a tiny user's manual, however, nothing like a full-blown note of tips and tricks. First, make sure your image uses the vdp_colors.bmp palette. If you are going to use a photograph, make sure it has good contrast/brightness. Fewest possible tiles (mazes, rooms, and tilemaps) For converting an image using the fewest tiles possible use this: tmscolor -t128 -b your_image.bmp your_image.bas your_image The -t128 indicates that you are going to use the fewest tiles for this image (it could be a tilemap) and you want to use character 128 onwards (there are 256 available, however, you probably need some for indicators and scores). The -b argument indicates that you are going to generate CVBasic source code. The third argument is your source image, the fourth argument is the target BAS file, and the fifth argument is the label used for the image data (you need a different label for each image on your program). The .BAS generated file contains code to draw the image on the screen. Use the argument -n to remove this code (still it will appear in a comment). High-resolution images High-resolution images are the ones mapped 1-to-1 to VRAM memory. TMSColor can accept any size of the image (the only requirement is that width/height are a multiple of 8 pixels), however, the easiest one to handle is 256x192 pixels (the size of the whole screen) tmscolor -b your_image.bmp your_image.bas your_image The generated VDP image will use only the available colors or the closest one arithmetically (for pictures you should use the option -p1 or -p2 with dither). However, a 256x192 image will use 12 KB of ROM space. This is a lot of space. Adding the -z switch you'll get Pletter compression in the output (and the space saving is great!) As before, the .BAS generated file contains code to draw the image on the screen. Use the argument -n to remove this code. An excellent example is available on Camelot Knights (see the bitmap camelot_title.bmp and read the camelot_title.bas file to see the code and the command line used to generate it) Sprites Sprites are 16x16 bitmapped things that the Video Display Processor (VDP) can overimpose on the background. You can define 64 of these sprites statically (there is 2K of VRAM allocated for this), or you can create a tileset of sprites that can be redefined on-the-go. However, I'll concentrate in the static 64 sprites' table, where each 16x16 pixels sprite is put together into a 128x128 pixels bitmaps (or any other size containing 64 sprites or less) tmscolor -s -b your_sprites.bmp your_sprites.bas your_sprites The generated BAS file will have the sprites in the required format for the VDP, along with the code needed to load it. As before, use the argument -n to remove the code, or the argument -z to get Pletter compression. An excellent example is available on Camelot Knights (see the bitmap camelot_sprites.bmp and read the camelot_sprites.bas file to see the code and the command line used to generate it) Pro-tips If you have a great deal of animation, you can run the same command for your sprite, and then define the sprite in real-time, typically just after the WAIT statement. DEFINE SPRITE 0,1,VARPTR your_sprite_big_table(sprite_frame * 32) This works for a single sprite, for defining two sprites at the same time: DEFINE SPRITE 0,2,VARPTR your_sprite_big_table(sprite_frame * 64) Notice these two cannot be used with Pletter, as each sprite would have a different length. References: * https://forums.atariage.com/topic/363252-camelot-knights-game/
  4. I always use Paint .net in Windows. It is free, and you can read easily PNG files and convert them to BMP format.
  5. CVBasic official extension is also BAS 😁 There are no verbosity commands for the compiler or the assembler.
  6. I think there are already very good and dedicated editors replicating an integrated development environment, and these can call CVBasic, gasm80 and CoolCV, as @Kamshaft just have shown with Notepad++.
  7. Cool! You can follow the same process to show a image in the background, but you need to create yourself your bitmaps for score digits as currently there's no way to do PRINT in the high-res screen mode. Yep, I know, the same bug that my BASIC program had 😁 I decided to keep it as a homage to history, but it is pretty easy to correct. This bug doesn't exist in the remake.
  8. Hi all. I've recovered a printout of one of my BASIC games from 1988 when I was a kid. A simple and short game where you advance on a scrolling scenery avoiding enemies. It was excellent timing because I wondered if I could port it to CVBasic, my BASIC compiler for Colecovision, as a test of the compiler's capabilities. The port was pretty easy, you can even relate it to the printed code. But then I started thinking if I could make an enhanced version of the game in CVBasic, so I made a title screen, designed some nice sprites, and added things that were impossible with interpreted BASIC, but feasible with compiled BASIC. In the process I debugged CVBasic, you'll need v0.4.2 to compile this. Get it from https://forums.atariage.com/topic/363101-colecovision-recharged-basic-compiler-cvbasic-v040-now-with-compression-and-msx-support/?do=getNewComment I've included the full source code of the games, including the BMP files of the graphics so you can build the game yourself. If you don't want to compile it, there are ROM files for both versions of the game. Enjoy it! camelot_knights_cvbasic.zip
  9. Now MSX can use the 32K of ROM and several small bugs solved. CVBasic updated to v0.4.2 in first post.
  10. Cool! Someday I want to go to visit Japan. BTW, talking about Japan, currently, the MSX games are limited to 16K because I have forgotten the bank switching code to enable the upper 16K for 32K games.
  11. I just tested the latest ZIP file grail_20180210.zip and it compiles without problems. You need to invoke the compiler from the same directory where are all the game files. My command-line was this: intybasic --cc3 --title "Grail of the gods" grail_plus.bas grail_plus.asm as1600 -o grail_plus grail_plus.asm jzintv --jlp -z1 grail_plus
  12. I hope you had a nice trip to Japan! You got me! I missed that information in the manual. The Y-coordinate visible range for sprites is 240 to 255, and 0 to 190. 240-254 allows the sprite to enter smoothly from the top, 255 is the top pixel row of the screen, and 0-190 is the whole vertical range of the screen (190 being the bottom pixel row of the screen). Values 191-239 makes the sprite invisible. Additionally, the value 208 for the Y-coordinate disables sprite processing starting on that very sprite. For example, SPRITE 0,$d0,0,0,0 forces SPRITES 1-31 to disappear even if active.
  13. Just released v0.4.1 solving several tiny bugs found while testing (including the gasm80 one). See the first post.
  14. There is a bug in my assembler, for some reason it shortens the included binaries. Try tniASM v0.45. Edit: I just found the bug, I forgotten to open the binary file using "rb" mode in Windows. So it worked in every single platform except Windows. It will update the package in the next version. In the meanwhile everyone can use tniASM v0.45 if using INCBIN in Windows. Just built it with an Alex Kidd track, it isn't perfect but it works. vgm.rom
  15. Hi all. Today is Pi day (03/14) so here is a little CVBasic program to calculate it in your Colecovision. Enjoy it! REM REM Calculate digits of Pi REM by Oscar Toledo G. http://nanochess.org/ REM Creation date: 3/14/16 (Mar/14/2016) REM Revision date: 3/14/24 (Mar/14/2024) for CVBasic. REM Based on http://www.codecodex.com/wiki/Calculate_digits_of_pi#C CONST scale = 100 CONST arrinit = 20 CONST #digits = 250 ' It will generate 250/14*2 digits ' Cannot be greater because arr is 8-bit DIM arr(#digits + 1) carry = 0 FOR #i = 0 TO #digits arr(#i) = arrinit NEXT #i PRINT AT 0,"Digits of PI" PRINT AT 72,"" #i = #digits WHILE 1 #sum = 0 FOR j = #i TO 1 STEP -1 #sum = #sum * j + scale * arr(j) arr(j) = #sum % (j * 2 - 1) #sum = #sum / (j * 2 - 1) NEXT j k = carry + #sum / scale PRINT k / 10 IF #i = #digits THEN PRINT "." PRINT k % 10 carry = #sum % scale IF #i < 14 THEN EXIT WHILE #i = #i - 14 WEND WHILE 1 WEND pi.bas pi.rom
×
×
  • Create New...