Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


DusanStrakl last won the day on August 15 2020

DusanStrakl had the most liked content!


Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DusanStrakl's Achievements

  1. I have nothing to add to this , I am just here to say it is very impressive what you achieved so far and I am looking forward to more progress.
  2. I am late to the party, the question was already answered but since the documentation is a bit unclear I elaborated a bit more on my blog, especially because the Palette Offset works differently on 8bpp Sprites. Color 0 is again transparent, so binary value of %0000 0000 will simply show the color of the layer below (if there is one) Colors 1-15 will be affected by Palette Offset in Map data in the same way as in above example for 4bpp mode which makes sense because they only use 4 lower bits anyway and are simply complemented by top 4 bits from the offset. If Offset is 0 then Palette is unchanged. Colors 16-255 are not affected by the Palette Offset and are taken directly from the palette. Note that this is different from the behavior for the 8bpp sprites.
  3. I wrote tutorial on programming sound using PSG in BASIC: https://www.8bitcoding.com/p/sound-in-basic-i-programmable-sound.html
  4. Yeah, I am playing with X16 Emulator for more than a year and still mix them up occasionally Actually I saw so many questions about this I just started writing another post for my blog to explain how to use PSG in BASIC.
  5. I think you are overcomplicating a bit. You don't need to program VERA registers when using BASIC, you can use VPOKE to write data to VRAM directly and let BASIC interpreter deal with VERA registers. A simple program to turn on square wave (pulse) and increases frequency can be written as below: 10 VPOKE 1,$F9C3,%00111111:REM SET WAVEFORM FOR VOICE 0 20 VPOKE 1,$F9C2,%11111111:REM SET LEFT AND RIGHT CHANNEL AT MAX VOLUME 30 FOR N=200 TO 2000 STEP 5 40 VPOKE 1,$F9C1,INT(N/256):REM SET HIGH BYTE OF FREQUENCY 50 VPOKE 1,$F9C0,N AND 255:REM SET LOW BYTE OF FREQUENCY 60 FOR I=1 TO 200:NEXT I:REM DELAY 70 NEXT N 80 VPOKE 1,$F9C0,0:VPOKE 1,$F9C1,0
    Very cool I love it!
  6. Agree with Matt, VERA PSG is way to get started. I implemented very simple, rudimentary sounds in my version of Tetris in BASIC: https://www.8bitcoding.com/p/crazy-tetrominoes.html If you don't want to deal with programming you can also just import and call four basic sounds in my Simplest Sound Effects Library for BASIC: https://www.8bitcoding.com/p/simplest-sound-effects-library-for.html Later if you want to add music that plays independently in the background of BASIC program you can opt to a bit more complex Music Library: https://www.8bitcoding.com/p/music-player-library-for-basic-programs.html
  7. Thanks Lucky Phil. I agree, Commodore BASIC is not ideal language but then again there is no such thing anyway. I find it very convenient to tinker with, prototype and with some effort and clever coding a lot of fun results can be achieved.
  8. Thanks Jake. I agree and with powerful hardware supported graphics and 8Mhz clock speed a lot can be done in BASIC. I am working mostly on my Assembly tutorials now but I am sure I will add some more BASIC tutorials and games soon.
  9. This has been a common question for a while now and Stefan explained it perfectly. There are several other keys that can't be detected by standard Kernal routine at this time and I was assured that all the keys on the keyboard will have function in the future. I expect they will also fix some discrepancies like for example not use F4 to switch between 40/80 display when there is a dedicated button for it etc.
  10. Nice and very fast progress Vincent! Like Kliepatch and JimmyDansbo mentioned I wrote couple of libraries that could be useful for implementing sound effects and music. Full tutorials with access to source code are available on my blog: https://www.8bitcoding.com/p/simplest-sound-effects-library-for.html https://www.8bitcoding.com/p/music-player-library-for-basic-programs.html
  11. When I was working on something reusable for my needs I was always struggling with really how generic such a library can and should be. I can think of few dilemmas from the top of my head: Do I support default screen size only or make it generic, specifically Map width is tricky one because if you want to support anything else than 128 tile width the VERA MID parameter is no longer Y dimension and require more checks and bit shifting. How to handle colors, do I go for standard predefined colors for different objects/widgets or should they always be passed as parameters. If second what happens if you want to draw e.g. frame parts in different colors to represent highlights etc. Do I allow different variations e.g. can frame be with rounded corners or square corners or perhaps the whole frame can be built with full or half blocks or even custom characters. Support for Lower case / Upper case PETSCI / ISO and then translations to screen codes Before mentioned number to text translations etc. This can lead to a real rabbit hole of options so I suggest not to overthink and to really simplify the first version and only support default screen and very basic functionality and then see where it leads.
  12. Great initiative Jimmy. I think we all wrote bits and pieces of these type of routines but it would be great to have a library at our disposal.
  13. Yup had the same problem when I wrote music library for BASIC programs. Of course I had to back up registers because I had to allow the default IRQ handler to take over after I was done playing with PSG (pun intended ) and of course BASIC programs print, draw, scroll, etc.
  14. I can't test it right now but call to screen_set_charset function at $FF62 should do the trick. A can contain following values: Value Description 0 use pointer in .X/.Y 1 ISO 2 PET upper/graph 3 PET upper/lower Link to documentation: https://github.com/commanderx16/x16-docs/blob/master/Commander X16 Programmer's Reference Guide.md#function-name-screen_set_charset
  • Create New...

Important Information

Please review our Terms of Use