Site Pages

Friday 27 October 2023

No longer updated: New blog

Hi all,

Here is a quick post to let you know that I have been given a blog space on the mega65 domain to post about the MEGA65 computer. I have started a new blog there, and I hope you will find that blog as entertaining and educational and fun as this blog.  I mainly will be posting there for the foreseeable future.

ALSO, I am moving this blog content to a new site I've recently started: http://www.fightingcomputers.nl. so, if you miss a post that was here, look at that space. In time, this blog will empty and the content will move towards this new URL.

I hope to see you there!



Thursday 25 May 2017

1541 Ultimate II Guide 6 : D71 and D81 images


When you want to use your 1571 or 1581 drive with your C64 or C128 it's nice to be able to use the hardware to the fullest. That means using double sided floppies and enormous 800k disk images!

Later 1541 Ultimate 2 (1541U2) firmware levels support reading D71 and D81 images in the cartridge interface, but it cannot mount the images as it emulates a 1541. Duh!

It would be neat though if you could use the 1541U2 cartridge to write the D71 and D81 images to physical floppies.

I've written a program to do just that:


D71 and D81 images can be written using this C64 program, which is available on CSDB: http://csdb.dk/release/?id=156433

You can find the source here: https://github.com/wiebow/d81writer

The latest version is 1.1. This program works with 1541U2 firmware 2.6 and up.

You need to prepare some things on the 1541U2 before you can use it though:

1) Enable the REU in the 1541U2 cartridge, with at least a size of 1MB.
2) Enable the command interface in the 1541U2
3) Disable any cartridge in the 1541U2 as it can interfere with the REU functionality and the command interface
4) Format the floppy before using this program
Optional) When running the program on a C128 (in C64 mode) you need to modify the 1541U2 option CPU addr valid after PHI2 to 100ns

Place your D71 or D81 file somewhere on the USB or SD card and run the program. Follow the instructions, it is self explanatory. Writing a disk takes quite some time (11 to 20 minutes) so make sure you have a cup of coffee nearby.

Now this version is released, I am concentrating on creating a C128 native version which will use the burst commands for faster writing.

Until then, have fun!

Thursday 14 May 2015

Tetris in 6502 Assembler, the Nintendo way

I spotted a link on reddit towards this brilliant article, which you will probably enjoy if you have followed my series about programming Tetris on the C64.



The C64 and the NES both used the 6502, so there is something to be learned here. What is interesting to me is how different their approach to storing data, spawning blocks and rotations is.

Also, generating random numbers with the Linear feedback shift register algorithm sounds intriguing! I might use that in a later version, as I now use the SID chip to create a random number. That might not be handy when I start using sound :)

There are also little nuggets concerning getting the right block spawn ID, and using tables to get to values directly instead of using loops and additions... They used lots of lookup tables!

Very insightful. Read it if you like 6502 programming.