Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 01/18/21 in all areas

  1. 2 points
    Sorry for being late to the party. I'm currently using CC65 tool chain since it provides relocatable object models and a capable linker, plus integration with C. On top of that, since it runs on my modern machine, I have access to GIT (or what ever SCS you want). With out a source code control system, life ain't worth living! I totally get the idea of having a native development system, but modern editors (although I use Emacs) and source control are too much of an ask for me. Combine with the X16 emulator, and it's a pretty fast edit-compile-debug cycle.
  2. 1 point
    Hi All, I'm new to retro computing Ha ha ha I've worked on ancient machines for today's standards in the 90's only to find out now that what I was doing back then is now called retro computing Well, I had to make things last for the longest time as money was scarce back then I'd squeeze every little bit of performance and use out of my PCs from the 8088 XT Turbo to the 80286 AT, 80486 SX, Pentium MMX, Pentium II, Pentium III, Pentium 4 ....... to the latest machines today But seeing all these retro computing online from our 8 bit guy made me so nostalgic I still have all those gear back home Did not ever occur to me that they'd be worth something today or still be worth using Computers and IT eventually became a lifelong passion for me I missed out on these Amigas as they where prohibitively expensive when I was in high school Glad to be a part of this movement I hope to one day grab my hands on to this Commander X16 but if I was to name it it would have been Admiral 128 Ha ha ha I hope you guys know what I mean by this But Commander X16 it is I hope to get two sets One for me and another one for my Niece and Nephew I want them to experience retro computing too Regards to everyone, Marlou Jasmin Madrio
  3. 1 point
    slithymatt micro-optimizing a t shirt/desktop picture Then again Jimmy's version is compatible with 6502 systems so there's that!
  4. 1 point
    I have already created a pull request to add HEX$ and BIN$ https://github.com/commanderx16/x16-rom/pull/176
  5. 1 point
    Yes, it would really help if the Commander DOS functions were backed up by BASIC commands. MKDIR, CHDIR, RMDIR, COPY, DELTE, and SEEK. I'd also like to see some more numeric conversion and math functions. Specifically, we need HEX$ and BIN$ functions and the MOD operator. Right now, it takes about 10 lines of code to display a number to hex, when it really should just be something like PRINT HEX$(A) There are also still open feature requests for banked memory management and a few other things, as well... so there's still a long way to go on these kinds of things. Maybe if you have the skills, you can jump in and lend a hand. Now that I'm starting to get a handle on assembly for the Commander, I may step in and add some of my own commands (specifically, the ones I just mentioned.)
  6. 1 point

    Version 1.0.0

    1 download

    A simple game fully in Basic. This is a very little game I wrote on the commodore 64 ages ago, I changed it a little to work with vpeek, vpoke, the new color command, and the new screen resolution. To me starting with a simple game in basic is how I learned about the c64, and now the X16, before jumping in machine language. In the code for this game you can see practical examples, on how to set characters on the screen, read characters from the screen, change colors for characters, listen to the keyboard, set a screen mode. What surprised me was that I needed a delay in the code in order to have it not run too fast. This was not the case on the c64. I really like the way you can use the emulator in the browser, as it allows you to type in basic inside the browser, using "regular key mappings", and the run it. When I wanted to save it, I copy-pasted it into the installed emulator (hats off for who added he paste function there), and types the save command. This was done, because in the browser you cannot save it, and see it on disk (as far as I know) I added many REMs in the code, in order so it can be understood, and it is more of a tutorial, then a "real" game. Below I will go through the code. From line 5, the program initializes From line 9, the title screen is drawn From line 49, the game is initialized From line 199, the game loop starts From line 300, the game over screen is drawn Some miscelanious notes: The SCREEN command is used to set the screen in text mode (Petscii) 40x30 The color command is used to set character fore and background colors. Unlike the c64 each char has its own background color. There is no "global" background color CHR$(113) is used to draw the Petscii circle character, used on the title screen. Adding the actual character into the code listing, makes it hard to edit outside the emulator. CHR$(119) is another Petscii character VPOKE 0,0,x, pokes a character on the top level corner of the screen. So the text screen address = 0 (not like on the C64) On line 52 the bottom of the screen offset is calulated. NOTE: Even though the screen is 40 chars long, to get to VPOKE address of the next line, you need to add 256 bytes. SI and PI (StoneImage and PlayerImage) are Petsci chars, that are used in the game. NOTE: Petscii chars have different values in the PRINT or the VPOKE commands. Reminder: In C64/Microsoft basic a variable name is only two characters long max. Reminder: Lines in Basic should not be longer then 80 chars. When you make them longer, the emulator ignores them. A good place to see all PETSCII character codes is here: https://www.commanderx16.com/forum/index.php?/files/file/23-vera-chars/ Have fun! And the code itself: (it is easier to copy paste it in the browsers emulator and be able to modify it more easy here: https://www.commanderx16.com/emulator/x16emu.html ----- code below for copy past----- 5 REM SET TO 40X30 CHARS SCREEN 6 SCREEN 0 7 HM$=CHR$(19) 9 REM TITLE SCREEN ----------------- 10 REM SET COLORS TO BLACK AND WHITE, CLEAR SCREEN 11 COLOR 1,0: CLS 12 PRINT:PRINT:PRINT:PRINT : REM PRINT TITLE 13 PRINT " FALLING SNAKE": PRINT: COLOR 15 14 PRINT " YOU ARE FALLING DOWN A HOLE" 15 PRINT " AVOID ALL OBSTACLES" 16 COLOR 7: PRINT " PRESS SPACE TO START" 17 BA$=CHR$(113):BB$=CHR$(119) : REM BALL SYMBOLS 18 COLOR 2,0 : PRINT " "+BA$ 19 PRINT " "+BA$:PRINT " "+BA$ 20 PRINT " "+BA$+BA$+BA$+BA$+BA$+BA$+BA$+BA$+BA$;:COLOR 8:PRINT BB$ 25 GET A$: IF A$="" GOTO 25 : REM WAIT FOR KEY 35 TS=0 : REM SET TOP SCORE 49 REM START GAME ----------------- 50 COLOR 1,0: CLS 51 FOR T=1TO29:PRINT:NEXT 52 BO=29*256:SI=42: : REM BOTTOMSCREENOFFSET, STONEIMAGE 53 PO=15*256:PI=81:PC=2:PX=20 : REM PLAYEROFFSET, PLAYERIMAGE, PLAYERCOLOR 54 DE=1000 : REM DELAY VALUE 55 S=0 : REM SET SCORE 199 REM GAME LOOP ----------------- 200 GET A$ 201 IF A$=CHR$(29) AND PX<40 THEN PX=PX+1 : REM GO RIGHT 202 IF A$=CHR$(157) AND PX>0 THEN PX=PX-1: REM GO LEFT 210 X=INT(RND(1)*40)*2: C=INT(RND(1)*15)+1 : REM GET RANDOM STONE POSITION 211 PE=VPEEK( 0, PO+(PX*2)) 212 IF PE=SI THEN GOTO 400 220 VPOKE 0, BO+X, SI: VPOKE 0, BO+X+1, C 221 VPOKE 0, PO+(PX*2), PI: VPOKE 0, PO+(PX*2)+1, PC 296 FOR W=1 TO DE: NEXT : REM DELAY, SLOW DOWN CODE 297 PRINT : S=S+1 : DE=DE-1 : IF DE<0 THEN DE=0 298 GOTO 200 399 REM GAME OVER ----------------- 400 IF S>TS THEN TS=S 401 PRINT HM$:PRINT:PRINT:PRINT " GAME OVER": PRINT 402 PRINT " SCORE: "+STR$(S); 405 PRINT " TOP SCORE="+STR$(TS) 410 COLOR 7: PRINT: PRINT " PRESS SPACE TRY AGAIN" : PRINT:PRINT 420 GET A$ 421 IF A$ = "" OR A$=CHR$(29) OR A$=CHR$(157) THEN GOTO 420 422 GOTO 50
  7. 1 point
    I'm wondering.... Why are we trying to mimic the C64 OS here ? I'm thinking that if I want to have a better C64, we know there are (mainly there is) far better alternatives. But is looks like a C64, you can say. Yes, true. On the software side. But that's mainly because it was the easiest path to go. No need to rewrite everything. That being said, back to my initial question. As we are more or less making the thing, we can choose to do whatever we want. And we may go for ways more explicit than DOS"P"+CHR$(8)+CHR$(128)+CHR$(0)+CHR$(0)+CHR$(0), don't you think ? Something as simple as a DOS SEEK, for instance......
  8. 1 point
  9. 1 point
    Y gets set from your feeling of self-importance. X is loaded with zero just to publicly emasculate it.
  10. 1 point
    The file-based assembler project can now be found in its own github repo: https://github.com/irmen/cx16assem
  11. 1 point
    I like it. Couple of bugs, though: ldx, but indexing on y -> No idea what offset you'll be grabbing Never increments the index register -> Infinite loop Might also be considered a bug that the string length is limited to 256 characters. Here's a few alternatives. Arbitrary-length, null-terminated string (for up to a 16-bit address space): CHROUT = $FFD2 lda #<Msg sta loop+1 lda #>Msg sta loop+2 loop: lda Msg beq end jsr CHROUT inc loop+1 bne loop inc loop+2 bra loop end: rts Msg: .byte "Hello, World!", 0 String length less than or equal to 256 characters, null-terminated: CHROUT = $FFD2 ldy #0 loop: lda Msg,y beq end jsr CHROUT iny bne loop end: rts Msg: .byte "Hello, World!", 0 String length less than or equal to 256 characters, length-prefixed: CHROUT = $FFD2 ldy #0 ldx Msg loop: lda Msg+1,y jsr CHROUT iny dex bne loop rts Msg: .byte $0d, "Hello, World!"
  12. 1 point
    If this is about getting software onto, and data off of, the X16 from (for example) a PC, without reaching around to the back of the X16 to get at the SD slot and saving wear and tear on the card and the slot... aren't there a bunch of X1541 derivatives out there with IEC on one end and variously parallel, 9-pin serial, or even USB on the other end? This could free up the X16's user port for modem or printer connections.
  13. 1 point
    Yeah I thought this is what you may have been referring to. It could be more fun to use than say the Arduino IDE's serial monitor and such. Could even perhaps do simple graphing of logic states? One of the 6502 computers David reviewed had some nice to haves for this sort of thing, really bridging the gap between microcontroller and computer in a cool way. I think this would be a wonderful use of the X16 myself, yep!
  14. 1 point
    I wrote a series of blog posts/articles on Commander X16 architecture and coding. I have started with focus on beginners and then slowly moved to more advanced topics and techniques. First I tackle smaller chunks and use simple examples to show the topic in practice. After enough new knowledge is covered I write a complete game to utilize several of the techniques to illustrate how it all comes together so each new complete project is more complex than the one before. I do cover only Commander X16 specific so I recommend reading Commodore C64 BASIC tutorials and guides. Please note that the games and most examples are written with a goal to be as clearly readable and understandable so there is very little source code optimizations. Snake Game This game is written in very clean BASIC with very little trickery so not much special Commander X16 knowledge is required. We do VPOKE directly into video memory so only understanding of fundamentals is required. Recommended reading VERA Overview Topics Covered in Game Analyzing the game itself is a great way to learn basics like: How to structure source code (outer loops, game loop) What is Game loop Use of Data structure like multiple Arrays How to read Joystick, Keyboard How to use VPOKE to “talk to” VERA Video RAM organization and using colors Writing to certain location on the screen Using PETSCII control characters to display messages and title screen GOTO Crazy Snake Tutorial GOTO Download Tetris Clone This game introduces some more advanced features of Commander X16 and we have to take a bit more care of how to use data structures and optimize some parts of the game to make it playable. Recommended reading VERA Overview Tiles in Basic I - Video Modes 0 and 1 Colors and Palettes Topics Covered in Game Tetris clone requires us to improve on pretty much all parts of the snake game structure: We have additional loops outside and inside game loop Advanced game collisions based on screen state Pre-calculate relative positions of four segments of each tetromino Customize color palette Customize tiles (characters) Speed increase per level Adding sound to the game GOTO Crazy Tetrominoes Tutorial GOTO Download Boulder Dash style game With this game we are using most of the Commander X16 hardware capabilities and we are getting close to squeezing most out of it for BASIC games. We have to pay close attention to timings, synchronizing scrolling and animation, take care of different types of collisions, etc. Recommended reading VERA Overview Tiles in Basic I - Video Modes 0 and 1 Sprites in Basic I - Setup Sprites in Basic II - Animation Scrolling and Layers in BASIC Colors and Palettes Simplest Sound Effects Library for BASIC Font Library for Commander X16 Topics Covered in Game This game is taking advantage of hardware features of Commander X16 to the level it almost looks like 16bit game or something written in Assembly for 8 bit computer like: Two phase approach to development Full color mode Full screen scrolling Two layer graphics Scrollable playfield Static HUD Animated full color sprites 256 color title screen in graphics mode Advanced physics and game mechanics Loading assets to memory from binary files for: Tileset Sprite Sheet Fonts Sound effects library Title screen GOTO Crazy Boulders Tutorial GOTO Download
  15. 1 point
    I don't think that there is an implication that EVERYONE need to or want to transfer files in and/or out of their CX16 at speed faster than the built-in serial port allows, but coming up with use cases for SOME people to want to do so is not hard. (1) Because for many people, the easiest backup for the SD-card will be to write it out to some folder in a PC's mass storage (2) It doesn't REQUIRE cross development, but many people will do cross development. (3) Some people have things they'd like to do that exceed their budget for bespoke hardware and see a way for an existing PC to be used as a resource to fill the gap. (4) The amount of GPIO and freedom to program to the bare metal makes the CX16 attractive as a bench computer for some kind of work, and you'd like your bench computer to be able to talk to your laptop.
  16. 1 point
    The VERA has PSG registers located from $1F9C0 to $1F9FF. I think the best solution is to have the PETSCII character set moved to $1F000, so that bank 0 now holds enough capacity for 64 KB worth of tiles. $1F9C0 onwards has no longer been general-purpose video memory ever since the VERA 0.9 changes got put in place. Palette and sprite registers used to be in separate bins, but now they hog the very end of VRAM.
  17. 1 point
    Expansion hardware is a great point. I still think between all the options discussed across the forums that one of them will stick So I have to imagine we'll have some sort of file copy solution - other than Sneaker Net. I'm just not sure which one. I would imagine the simplest one will be the first one that works (and that sounds like some sort of user port solution is my guess - or perhaps the IEC port). I think I'd be less bothered by SD cards if they weren't so small and were more purpose made for frequent insertion and removal. Something between an SD card and 3.5" would have been nice, with slots intentionally made for the purpose. Micro-SDs are even worse - I've lost several already behind my desk and that's where they're staying. I have to swap SD cards between devices several times a week and it ends up being a pretty big annoyance for me and they definitely do wear (both the SD cards and the readers) if you swap cards a lot.
  18. 1 point
    Good point. The only thing where this might be problematic is developing (for) external hardware. Is there an API in the emulator that allows us to simulate external hardware (like expansion cards and/or hardware on the user port)? If not, is it planned to add it at some point? Or are there arguments against it? (Except developer time, which is of course always short. I guess this feature would be relatively far down on the priorities list, at least until the hardware is more or less finished.)
×
×
  • Create New...

Important Information

Please review our Terms of Use