Jump to content

DusanStrakl

Members
  • Content Count

    45
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by DusanStrakl

  1. Yes that is correct. the same happens with default palette. At startup the memory addresses from $1FA00 to $1FBFF do not contain actual color definitions, which is kind of confusing especially because older versions of Emulator/VERA did.
  2. I just uploaded PET font to my Fonts library.
  3. Haha nothing wrong with that. So far I built a skinny (light) font combined with original PETSCII fat graphics but might throw together other combinations as well, and of course the same combinations are possible also with Upper/Lower font and reduced graphics set. https://www.8bitcoding.com/p/fonts.html
  4. Maybe my implementations of Music Player and Simplest Sound Effects Library for BASIC programs could be useful to you. I go into some detail explaining how they work on my blog posts: https://www.8bitcoding.com/p/simplest-sound-effects-library-for.html https://www.8bitcoding.com/p/music-player-library-for-basic-programs.html
  5. To shamelessly plug my blog... I covered how the character screen works, where and how tiles (character set) is defined and how to change it in this post: https://www.8bitcoding.com/p/tiles.html
  6. Thanks for both answers. The usual suspects to the rescue To be honest I didn't even know that VLOAD is implemented so I didn't even experiment with it. I saw it mentioned in documentation with TODO comment so I assumed it is not there yet. LOAD does not work with loading data directly to VRAM and if there is dedicated VLOAD for that it probably shouldn't. There is no point to have two commands doing the same thing it just add unnecessary confusion. I think I will test VLOAD thoroughly in the next few days and probably write a short tutorial on how to use it after that.
  7. Has anybody recently (e.g. Emulator R38) tried to load binary files directly to VRAM from BASIC? It worked before but now it is driving me crazy and it just doesn't work. If I load the file to regular RAM it works fine with following for example: LOAD"TEST.BIN",8,1,$8000 The command LOAD"TEST.BIN",8,2,$8000 should load to VRAM bank 0, and LOAD"TEST.BIN",8,3,$8000 should load to VRAM bank 1 but it always just loads to regular RAM even if I try something like LOAD"TEST.BIN",8,8,$8000 it gets loaded to RAM without error. I tried changing first two bytes in TEST.BIN file between $00 $00 and $00 $80 and many other combinations with no luck. Thanks
  8. Thanks for the comment Mikael. It seems that there was some interference between effects library and some VERA related actions from BASIC programs, specifically in your case, scrolling of the screen. I added some code to save and restore VERA state inside the IRQ Player. I tried both EFFECTS.PRG and EFFECTSHI.PRG with your program and it seems to work without problems now.
  9. No worries, everybody has made this mistake at least once. If you have too much time you can read up following two posts on why it behaves this way: Mathematical explanation: http://www.righto.com/2012/12/the-6502-overflow-flag-explained.html If you want to go to the level of silicon: http://www.righto.com/2013/01/a-small-part-of-6502-chip-explained.html
  10. Thanks. I hope you can make it. Just share your progress and there is plenty of help out there. I myself do not come over here often enough but will try to follow this forum a bit closer in the future.
  11. Thanks. If there is specific topic you feel needs coverage I would be happy to dig into.
  12. I have covered most of the topics you are asking about in the series of tutorials on my blog: https://www.8bitcoding.com/p/commander-x16.html I go pretty deep into explanations on how VERA works, different video modes, sprites, sprite animations, scrolling, layers and even some simple libraries to add music to your programs. Examples are written mostly in BASIC and some in Assembly but of course all the hardware related subjects are applicable to all programming languages.
  13. Interesting. It might be tricky to poke values directly because BASIC might be too slow and the player is called 50 times per second. Maybe try stopping the current sound by poking 0 into "running" first, change the envelope parameters and then start the sound by poking 255 into "phase". Obviously I haven't tried this...
  14. I wrote few games in BASIC and it can be done. Even with faster CPU speed you still have to design it very carefully though. Like you found out graphics is usually a bottleneck so whenever you can use hardware to help use it. So perhaps instead of continuously drawing to screen, try to load the whole map at once directly into VRAM and move around by scrolling which typically only requires couple of POKEs instead of drawing. In my experience any time you have to do X times Y loop for drawing from BASIC it is time to reconsider the design. If assembly is an option of course that changes everything but it is not a BASIC game anymore and that is a special kind of challenge. Perhaps some of the examples and resources from my blog would be helpful: https://www.8bitcoding.com/p/commander-x16.html
  15. Of course Andy, that's why I posted the source code so that anybody can reuse it. I didn't plan to make this particular library multichannel but it should be pretty easy doable. I think your approach to simply duplicate the code four times for four channels is totally fine, the other approach would be a loop. I am actually working on another library that is intended to play music in the background and supports full ADSR sound modulation and would have few predefined instruments etc. It is almost working but I am currently distracted by another project but hopefully I can find few days to finish and test it.
  16. Version 1.1.0

    9 downloads

    Usage Because of its simplicity the library can be stored in a 1K space below basic programs, starting at $0400. Save the EFFECTS.PRG program in the directory where your BASIC program is stored, which would typically be in the same directory from where you are running the emulator. Load library with LOAD command: LOAD”EFFECTS.PRG”,8,1,$0400 Since this routine after the first run adds a new interrupt handler it is good practice to only load it once. It is therefore recommended to do a simple check: IF PEEK($400)=0 THEN LOAD”EFFECTS.PRG”,8,1,$0400 And that is it. Now you only need to call the needed sound effect from the BASIC program with a simple SYS command. We have four different effects so four different addresses can be called: SYS $400 PING Is designed for events like picking coins or rewards. SYS $403 SHOOT Effect that can be used for shooting the gun or other weapon. SYS $406 EXPLODE Electricity zapping or perhaps a laser gun sound. SYS $409 ZAP Long explosion for when we successfully blow something up Alternative binary named EFFECTSHI.PRG that loads into memory at $9000 can be downloaded. Of course calls are then $9000 for PING, $9003 for SHOOT, $9006 for ZAP and $9009 for EXPLODE. Full source code and walk through is available at my blog: https://www.8bitcoding.com/p/simplest-sound-effects-library-for.html Demo video:
  17. Simplest Sound Effects Library for BASIC programs View File Usage Because of its simplicity the library can be stored in a 1K space below basic programs, starting at $0400. Save the EFFECTS.PRG program in the directory where your BASIC program is stored, which would typically be in the same directory from where you are running the emulator. Load library with LOAD command: LOAD”EFFECTS.PRG”,8,1,$0400 Since this routine after the first run adds a new interrupt handler it is good practice to only load it once. It is therefore recommended to do a simple check: IF PEEK($400)=0 THEN LOAD”EFFECTS.PRG”,8,1,$0400 And that is it. Now you only need to call the needed sound effect from the BASIC program with a simple SYS command. We have four different effects so four different addresses can be called: SYS $400 PING Is designed for events like picking coins or rewards. SYS $403 SHOOT Effect that can be used for shooting the gun or other weapon. SYS $406 ZAP Electricity zapping or perhaps a laser gun sound. SYS $409 EXPLODE Long explosion for when we successfully blow something up Alternative binary named EFFECTSHI.PRG that loads into memory at $9000 can be downloaded. Of course calls are then $9000 for PING, $9003 for SHOOT, $9006 for ZAP and $9009 for EXPLODE. Full source code and walk through is available at my blog: https://www.8bitcoding.com/p/simplest-sound-effects-library-for.html Demo video: Submitter DusanStrakl Submitted 08/12/20 Category Dev Tools
  18. Interesting project. I was actually thinking about putting it on my list of possible future projects but unfortunately that list is way too big already especially considering available free time Considering that sending data to VERA can be a bottleneck some sort of hybrid solution of tile background with hardware scrolling and bitmap road with bending by using scan line shifting might work and leave enough CPU time for manipulating animated sprites that could be used for everything else. Keep us updated and good luck!
  19. Sounds great. Any news on the Keyboard driver? Will we be able to read all CX16 keys? Thanks, Dusan
  20. Perfect. Exactly the answer I was hoping for and it works as expected. Thanks, Dusan
  21. I am trying out cc65 and it seems the documentation is quite messy. So far I have no problem building C projects, also assembly with BASIC startup starting at $801 but I have difficulties building executable from assembly to be loadable into any arbitrary memory location. I know it is lazy way out but would prefer coding to reading documentation for few hours Thanks, Dusan
×
×
  • Create New...

Important Information

Please review our Terms of Use