Sunday 4 May 2014

BASIC now mostly working in C65 mode

After a bit of poking around the C65-mode BASIC interpreter I worked out that I had forgot to implement PHW absolute mode (immediate mode was already working).  So after a quick fix, BASIC in C65 mode is now superficially working, as can be seen here. GO64 also works fine to drop to C64 mode.

However, problems still remain. When I tried to get the disk directory, it reads the first part, and then stops, and further attempts to read the directory fail.  The same thing happens if I use LOAD"$",8.  This is quite odd, because the same thing works just fine in C64 mode.  Curiously, if I load a program before trying to load the directory, that works okay.  But if I try it after it fails.  It might be that there are still missing instructions that are used in the C65 DOS access routines.  I really need to finish my suite of 4510 instruction tests.

Also, as can be seen, once the screen scrolls, the copying of the colour memory goes a bit weird.  This uses the DMA controller in copy mode.  Hopefully a bit of poking around with that will reveal the nature of the problem.

But in the meantime, a happy piece of progress that BASIC is now responsive.


  1. Great project !

    Hope to see it being finished: it would be awsome to have a semi-real C65 to play with.

    Keep up the good work !

  2. This whole project is very nice! However I always had the dream somehow to have an extended DTV: that's a much more accessable "real" hw (ok it is still an ASIC based board not a "real" 8 bit hw ...), some people have (like me) than a real C65, and maybe more programs (even demos) are produced for the DTV than C65, also the compatibility factor is better (IMHO) between DTV and the C64. I wish I could have a new DTV with more "hobby user friendly" form (modding, access to the bus to hack - I mean the "flash" bus at least, since the "ram" bus is directly an SDRAM controller stuff). Maybe some new features can be added (faster CPU, new opcodes, new video modes). About new video modes: DTV is nice, having 256 colour display, scroll, DMA, Blitter etc, but I would love to have more resolution, direct VGA (and/or HDMI) output, and maybe even more colours with some RGB palette registers at last. Sorry, I don't want to say your C65 project is not nice, IT IS :) Just maybe I would like to have both :) And thanks for your blog, it's really fun to read. I've tried to learn VHDL/Verilog, but it's totally alien for me (though I can program in many languages, but not the HDLs, it seems ...).

    1. Hello,
      I agree, it would be nice if the C65GS could be implemented in an ASIC one day instead of just an FPGA. There is really no reason why it couldn't, apart from the cost. Then it would be what you are asking for, as just about everything on your wishlist is rolled into the C65GS already.

    2. Hello (sorry, I skipped the greeting my previous comment, however I usually don't do that in "only" comments but I could seem to be rude, anyway)! My not so good English can and could be a problem which can makes hard to express myself clearly, so what I wanted to say: I also love to have a "remaked" and "extended" C65 what you did, but I always thought since years, that the best could be to do the same you did with the C64DTV: to have an extended version which is (almost?) fully compatible with the original C64DTV. Though your work can contain many things what DTV knows (or even more, like resolution), it won't be compatible with softwares made for the DTV (C64DTV) which is maybe larger software base than the C65 softwares. Again: I personally things your project is great, and I would love to have a "new C65" this way, I only wish if I could have the same for the DTV too, and not instead of course. I am not sure anyway if I can even know the difference between ASIC and FPGA, for me they are the same, only FPGA can be re-porgrammed (also it must be "uploaded" on each power-on, at least if it does not have some kind of integrated EEPROM or such some FPGAs already have) while ASIC is not :) And my knowledge stops here. I wish I could know as much as you on HDLs and FPGAs to start a similar project for the C64DTV-NEW as well. Thanks for your project, blog and your answer on my previous post too.