Jump to content

Elektron72

Members
  • Content Count

    91
  • Joined

  • Last visited

  • Days Won

    2

Elektron72 last won the day on May 5

Elektron72 had the most liked content!

Community Reputation

61 Excellent

Recent Profile Visitors

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

  1. While there may be 253 possible locations for pointers, overlapping locations can't be used at the same time. Therefore, there are only around 127 pointers usable at one time.
  2. I couldn't find it in the documentation, but I believe DA$ is reserved for reading the date from a real time clock.
  3. I believe that ZeroByte is saying that as the kernal uses various system resources (e.g. half of zero page, various other pages in memory, and processing time due to the default IRQ handler), you may be able to push the system further by disabling it entirely. However, given the amount of resources available on the X16, disabling the kernal is likely not worth the additional programming difficulty in most situations.
  4. The documentation states that r6-r10 are saved no matter which kernal routine is called, so those are safe to use. r0-r5 are only changed if the kernal routine being called uses them as return values, so these can be used depending on which kernal calls are executed. Finally, while r11-r15 are officially designated as scratch registers, they will only be overwritten if a kernal call is made, so they are very useful for temporary values.
  5. The ca65 assembler provides solutions to several of these issues. It provides code and data segments that are stored separately in memory. It also provides a segment for uninitialized values, which is not saved as part of the program. The Commander X16 Programmer's Reference Guide contains documentation on how the 16-bit virtual registers are used. I believe that the best way to use zero page is to use the virtual registers for temporary values used only for indirection, and to store permanent variables in the rest of zero page. Even at 8 MHz, the cycles saved by using zero page variables do add up, and when performing time-sensitive operations such as servicing raster interrupts, zero page is very useful. As every instruction that provides absolute addressing also provides zero page addressing (except JMP and JSR), it's a good idea to use as much of zero page as possible. A simple way to handle zero-terminated strings is to use a BEQ instruction immediately after loading the next byte of the string, allowing the program to break out of the loop. I believe the 65C02 corrected this bug. I agree that this addressing mode has very few uses. Given that the 6502 removed almost any feature that made the CPU too complex, I would assume that this addressing mode was included because it was very simple to implement, not because it was actually useful.
  6. I'm glad you didn't choose (or even consider) the TI-83/84 calculators as the series platform, as Texas Instruments is rapidly removing support for user assembly programs on their calculators. In fact, one of the reasons I discovered the X16 was because I was looking for an alternative to TI's graphing calculators for programming.
  7. After making some changes to the code, I was able to get the following version to compile:
  8. I assume you would use a program like X16 Edit that can edit text files without line numbers.
  9. Not sure whether this will crash when it runs, but I was able to get this test program to compile:
  10. I know this isn't implemented in the emulator yet, but would it be possible to use one of the VIA timers to trigger an interrupt when the YM2151 would be ready to receive more data?
  11. I believe that all models of the X16 will run at 8 MHz. There may be jumpers on the board to adjust the clock speed, but these would likely only be used for debugging. Furthermore, because of the X16's VSYNC and LINE IRQs, I suspect that clock speed will not be as important as on other systems. If it is necessary, you might be able to detect the clock speed by counting between two LINE IRQs.
  12. Could you post some of the program code? I wrote a program containing nothing but a call to joy_load_driver, and it compiled.
  13. I would like to mention that the SNES only had 64K of VRAM (and the NES, if I read the documentation correctly, only had about 10K of video memory), whereas the X16 will have almost 128K. With a bit of clever programming, the X16 will likely be able to provide similar graphics capabilities to a 16-bit machine.
  14. The clock speed of the Commander X16 is about 8 times as fast as that of the C64. The emulator runs at roughly the same speed as actual hardware, and I do not believe BASIC has been optimized much.
  15. RDTIM returns in jiffies, or 60ths of a second. If you wanted to convert to milliseconds, you would need to divide by 60 and multiply by 1000.
×
×
  • Create New...

Important Information

Please review our Terms of Use