General Category > LisaList2

Directly BEEPING on the Lisa by writing to VIA register

<< < (2/5) > >>

stepleton:
Yes, that's correct! Here's a small 68000 assembly program of my own that does exactly this.

kewatsdop:
Thank you Tom. I tried it out: compiled your Mandelbrot demo using vasmm68k_mot -Faout LisaMandelbrot.X68, and then created a floppy image using python dc42_build_bootable_disk.py a.out -f sony_800k -o floppy.dc42.

All worked fine!!! Thank you so much for this useful script.

Now I'm off to playing with 6522 register and trying to produce sounds in bare machine code...

One follow-up question. Is it easy to create a physical floppy disk out of a *.dc42 image? Would it be as easy as using dd if=floppy.dc42 of=/dev/myusbfloppydrive? I will be wanting to try my code also on an actual Lisa.

stepleton:
No, it won't work to use dd: a DC42 disk image has metadata at the front, and it also breaks each 524-byte sector into two pieces and stores them in different parts of the file, for reasons that make sense in an Apple context. Refer to these resources for details:

https://web.archive.org/web/20161028130400/https://wiki.68kmla.org/index.php?title=DiskCopy_4.2_format_specification
http://sigmasevensystems.com/blumanual.html Appendix E

If you have an older Mac, you can use Disk Copy 4.2 to write the disk image to a floppy. If you don't, then you still have some options. LisaEm includes a tool called dc42-to-raw which can convert a DC42 disk image to a raw file that you can use with dd. Or, you can boot up BLU on your Lisa and send the DC42 file to the Lisa via the serial port. BLU understands the format and can write the data to a floppy.

Lastly, you could buy a Floppy Emu and use that instead of your Lisa's floppy drive. Floppy Emu can work with DC42 files.

kewatsdop:
Thank you for the detailed answer! Ok, so even if it is not straightforward, there are several options to choose from. I'll be trying them out a couple of weeks from now. Before that happens, let me use the excellent LisaEm.

kewatsdop:
Hmmm. I wrote this as a stub and template:

; zero
                ORG     $800

SOUNDTEST:
                NOP

                END SOUNDTEST
                             

...and built myself a script to compile -> build disk...:

filename=$1
filename="${filename%.*}"

echo "Filename without extension is ${filename}"

echo -n "Compiling $1 with vasm... " &&\
vasmm68k_mot -Faout $1 &&\
echo "done." &&\
echo "Creating bootable floppy... " &&\
python ../bootloader-master/dc42_build_bootable_disk.py a.out -f sony_800k -o ${filename}.dc42 &&\
echo "done."

...which nicely produces a.out, and then the floppy image, but I'm getting boot ROM error 75 when trying to start from such a floppy image. What am I missing?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version