Jump to content

Michael Kaiser

  • Posts

  • Joined

  • Last visited

Everything posted by Michael Kaiser

  1. Use "cx16-bank.cfg" and put your string literals in one or more pages of banked memory. Look at the "multidemo.c" example to see how to use this. There are no extended memory drivers for cx16. You just have to change the bank manually before calling stuff in a bank. You specify "#pragma code-name (push, "BANKRAM##");" (where ## is 01 - 0F) before the code to be placed in the bank and "#pragma code-name (pop);" after the code. Make sure you specify "-C cx16-bank.cfg" to cc65. The compiler will generate a bunch of extra files. You will need to manually load them into banked RAM at program start. Examples can be found in "multidemo.c". You can also put code into banked RAM, but the code in banked RAM must be called either from code in the same bank or code in the main memory. You cannot directly call one bank from another.
  2. What is the NMI line on the processor connected to?
  3. Just the reverse. I like to put the screen update in the IRQ and the game logic in main loop. Furthermore I use ONLY a raster IRQ which starts when the beam goes of the bottom of the screen. That way I should update the screen between the time the beam leaves the bottom of the screen and it reaches the top of the usable area. No tearing and no flicker if you do that.
  4. I usually define a low resolution grid, not visible, which is used for collision detection. The sprites move with pixel level accuracy, but the low resolution grid is only accurate to 8 or even 16 pixels. I keep both in sync when they move. When I sync the move on the low res grid, I look to see if something in the cell before I move the item. If something is there, it's a collision. I use a unique byte value for each item, so I can know with certainty what hit what using a single check.
  5. It would really be nice if CC65 would page to banked RAM. Given that the paging is instantaneous, you only really lose 5 - 7 clock cycles on a page flip. The advantages of getting LOTS of memory out weighs this cost.
  6. Yeah the older drives had a 6502 and a 6504 (6502 with only 13 address lines). They did some "magic" with control logic so that the 6504's view of memory was offset from the 6502 by 4k. This made the 2 processors pull their starting address from different places in ROM. The 6502 talked to the IEC port and parsed commands, etc. When it wanted blocks from the disk it pushed commands into a queue in RAM which triggered the 6504's IRQ. It would pick up the command, execute it and RTI. The main loop of the 6504 sat in an infinite loop. In the 1540 and up there was only one 6502 and the trigger triggered the 6502's OWN IRQ to execute the commands.
  7. Each processor would NEED to see $0100 - $01ff and $fffc - $ffff uniquely. Zero page would also be desirable. So... $0000 - $01ff is RAM unique to each CPU. $ff00 - $ffff is ROM unique to each CPU. The rest can be banked. The ROM stub at $ff00 gets run by the startup vector and sets up the initial paging state for both processors. The rest of the ROM can be in shared or unique ROM, but will have to be paged in by the bootstrap and off they go... It should be noted that you now have TWO IRQ lines and TWO NMI lines each of which can do different things and can run simultaneously. This really does make for some really unique opportunities. Signaling between processors could consist of dropping a message into shared RAM and kicking the other processor's NMI line.
  8. What connector is used for sound? On all of the pictures I have seen there is a VGA connector, an svideo connector and a yellow RCA connector. None of these connectors carry sound.
  9. Ok. So copy zero page and stack to bank for task 1 and store registers, copy bank and zero page from bank for task 2 and retrieve registers. Takes about 1.5 microseconds at 8Mhz. That might actually be usable.
  10. The reason I asked is because the C128 could do it. I had a C128 30+ years ago and did not have the skill at the time to write a task switching kernel. I was hopeful that the X16 would be able to do this and had hoped to write a task switching kernel that could do this. And yes, I saw both GeckOS and Contiki and their ability to switch tasks by subdividing the stack. I just found that limiting. I may still do this by subdividing the stack.
  11. Has any consideration been made to making the stack ($0100 - $01FF) pageable? Maybe zero page ($0002 - $00FF) as well? This would greatly assist in multitasking.
  12. I understood the change to use $00/$01 for bank switching was supposed to be in v38. I'm running v38 and the bank switching still seems to be $9F60/$9F61.
  • Create New...

Important Information

Please review our Terms of Use