Jump to content

Greg King

  • Posts

  • Joined

  • Last visited

  • Days Won


Greg King last won the day on June 28

Greg King had the most liked content!

1 Follower

Recent Profile Visitors

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

Greg King's Achievements

  1. "-t" sets the CPU. Therefore, if you want a different one, then you must put "--cpu" on the right side of "-t".
  2. The LLVM linker works that way.
  3. You can go further. If several of your functions use the same data or variables, in a way that doesn't conflict with each other, then you can put that data/variables into their own source files (those files might not have any code in them). The idea is that your program won't have two copies of them even if that program is using two functions that need them -- it's less bloat.
  4. Their philosophies are different. stdio is stream-oriented, while conio is screen-oriented. A stdio program is expected just to print and print and print and... It cares little about the height of a screen. A conio program is expected to stay on a single screen. It reuses that screen's real estate. It overwrites old text with new text. That's why conio has ...xy() positioning functions. It's why there are cclear... functions. And, it's why carriage return and line feed are separate characters. We can use carriage return to type and retype on the same line.
  5. "(_printf.o)" is the common formatter function that everything uses. "(printf.o)" has the printf() function. But, it calls "(vfprintf.o)", which calls "(fwrite.o)", which calls "(write.o)".
  6. You should use printf(); in an example about stdio code.
  7. We use https://github.com/cc65/cc65/blob/master/targettest/dir-test.c to test our standard directory functions. (Ignore the comment at the top of the file! It describes the CBM library implementation, not the test program.)
  8. Yes, only the load and save functions work on the emulator's filesystem. Standard I/O and POSIX I/O work on the SD filesystem as the standards say that they should. However, subdirectories don't exist in CBM DOS. Therefore, those functions might not work in CMNDR DOS as you would expect.
  9. Currently, the increment/decrement must be or'ed into the address expression that's given to vpeek() and vpoke(). No one has taken the time to document a lot of the functions that are available in cc65's libraries. (Usually, someone finds a function in a header, learns that it's very useful to him, notices that it's not in the doc, then submits a patch to "funcref.sgml".) Yep. But, it isn't complete. For example, there are no constants for configuring sprites. "cx16.inc" (for Assembly programming) has much more of that stuff in it.
  10. #include <cx16.h> ... VERA.control = 0; VERA.address = address; VERA.address_hi = 1; VERA.data0 = the_byte; It compiles to the same Assembly code. But, it looks more C-like, less BASIC-like. cc65 also has vpeek() and vpoke() functions. They directly touch VRAM and internal registers.
  11. Those functions were designed for the mouse sprite. Its shape data is in the Kernal ROM. sprite_set_image is used to copy it into VRAM. sprite_set_position is used to move the mouse pointer during vertical blanking.
  12. Run the emulator. Use BASIC's MON command to start the monitor. Give the command "m fff0 ffff". You'll see it.
  13. This thread actually is about the mainboard version, not the Kernal version. This is the easiest way to test it, and switch to the Kernal bank: ; Assume BASIC ROM bank 4 at this point. stz $01 lda $FFF8 ; BASIC has zero, Kernal has nonzero bne mb2 stz $9F60 mb2: "stz $01" changes that location, but does nothing else, on mainboard #1. It changes to Kernal's bank on other mainboard versions. $FFF8 is a part of Kernal's "mist" signature. But, it's zeroes in the BASIC bank.
  14. The language in the description doesn't make it clear whether or not the LFO can do both modulations at the same time. Maybe, the F bit controls the output Function of the LFO (either it changes the frequency of another oscillator, or it changes the volume of that oscillator, but not both).
  15. That comment is about KickC. As I wrote earlier, cc65 works very differently.
  • Create New...

Important Information

Please review our Terms of Use