Thanks sorchard
@all, Simon just notified me of a small error. DP was set to a wrong value because I changed the .org adress at the last minute. This has been fixed now in the github release.
Does anybody know how I can export the high byte of the current adress to a symbol in lwasm? ie. instead of lda #$0f \ tfr a,dp \ setdp $0f, I'd like to do something like lda #(int(*/256)) \ tfr a,dp \ setdp int(*/256). So the only thing a user would need to change when assembling to a different address would be the org statement.
pcmplay - new dragon sound routine
Re: pcmplay - new dragon sound routine
Not sure about lwasm but this is what I do in asm6809. Perhaps lwasm will let you do something similar...utz wrote:Does anybody know how I can export the high byte of the current adress to a symbol in lwasm?
Code: Select all
start org $2000
pshs cc,dp
orcc #$50
lda #(start >> 8)
tfr a,dp
setdp (start >> 8)
;etc
Stew
Re: pcmplay - new dragon sound routine
Just a question about this ...
Should the BIN file do anything when loaded into a Dragon 64 without DOS emulation in XRoar?
It loads but does nothing at all (?)
I must be doing something the wrong way, but I can't spot what.
Any advice?
thanks beforehand
pere
Should the BIN file do anything when loaded into a Dragon 64 without DOS emulation in XRoar?
It loads but does nothing at all (?)
I must be doing something the wrong way, but I can't spot what.
Any advice?
thanks beforehand
pere
Re: pcmplay - new dragon sound routine
@pser1: Hmm, you should be able to run it with EXEC &HF00. That works for me at least.
@sorchard: No need to thank me for that, I'm glad that somebody put it to good use
That bitshifting trick seems like a good idea, I'll check if that works in lwasm tomorrow. There also seems to be a problem with the keyhandler not detecting the space key on the Dragon - anybody else having that problem? Is the Dragon's keyboard wired differently than the CoCo's?
@sorchard: No need to thank me for that, I'm glad that somebody put it to good use
That bitshifting trick seems like a good idea, I'll check if that works in lwasm tomorrow. There also seems to be a problem with the keyhandler not detecting the space key on the Dragon - anybody else having that problem? Is the Dragon's keyboard wired differently than the CoCo's?
Re: pcmplay - new dragon sound routine
It is. Changing bita #8 to bita #$20 should fix the space bar.utz wrote:Is the Dragon's keyboard wired differently than the CoCo's?
Dragon key map below:
Code: Select all
Keyboard matrix
Bit is pulled low by key
FE FD FB F7 EF DF BF 7F Write FF02
01 0 1 2 3 4 5 6 7 (Right joystick button)
02 8 9 : ; , - . / (Left joystick button)
04 @ A B C D E F G
08 H I J K L M N O
10 P Q R S T U V W
20 X Y Z Up Dn Lft Rgt Spc
40 Ent Clr Brk NC NC NC NC Sh
80 (Comparator input)
Read FF00
Stew
Re: pcmplay - new dragon sound routine
Can anyone tell me how I can run this on my real dragon ?
I don't have drivewire but I have the means to transfer .vdk files to real floppy disks.
Maybe someone can add the .bin file to a .vdk file for me ?
Thanks for any help
John
I don't have drivewire but I have the means to transfer .vdk files to real floppy disks.
Maybe someone can add the .bin file to a .vdk file for me ?
Thanks for any help
John
Re: pcmplay - new dragon sound routine
I'm a bit rusty on disks but I managed to crudely save a big chunk of memory to a vdk and that seems to work.
RUN"PCMPLAY.BIN"
Pressing the 'O' key quits, as that is what the coco space bar maps to on a Dragon.
RUN"PCMPLAY.BIN"
Pressing the 'O' key quits, as that is what the coco space bar maps to on a Dragon.
- Attachments
-
- pcmplay.zip
- (2.07 KiB) Downloaded 200 times
Stew
Re: pcmplay - new dragon sound routine
Fantastic ! Thanks very much
Can you explain how to do this easily, so I may do it with any future releases ?
Thanks again
John
Edit: just wrote it to a floppy and it works great on the real Dragon !
Can you explain how to do this easily, so I may do it with any future releases ?
Thanks again
John
Edit: just wrote it to a floppy and it works great on the real Dragon !
Re: pcmplay - new dragon sound routine
Hello,
I don't know what did I do wrong the first time ...
I have loaded TEST.BIN and then EXEC &HF00 and works flawlessly.
The same applies to the VDK uploaded by sorchard, works with no problems.
This is the procedure I use to put any binary file onto a VDK file:
- Copy the .BIN file to a PC folder
- Using any viewer / hex editor, Look at the bytes 2-3 and 4-5. The 2-3 are the file length, being the 4-5 the load/exec address
both 16 bits. In this case I found these ones: $14D1 and $0F00
These offsets apply only when the binary file has a CoCo-like header (begins with a $00) as is the case.
If it had a Dragon-like header (begins with a $55) then the bytes are: 5-6 (length), 3-4 (load) and 7-8 (exec)
- Start XRoar and attach an empty VDK file (180k) I am attaching a zip that contains a VDK 180-360 and 720k
- Next, load the bin file: Ctrl+L and then choose the desired file
- Finally save the file: SAVE "TEST",&H0F00,&HF00+&H14D1,&H0F00
And that is all you have to do to have the binary file ready to be run from the disc, just by RUN"TEST.BIN"
If you have a drivewire server and any parallel to USB adapter, Tormod's one for instance
viewtopic.php?f=6&t=4270
then you could use my dweeb V2FLO to copy the whole disk to the floppy in the default drive or you could use my extender and
then LINK the VDK to unit 4 and send a BACKUP 4 to 1
You could find the V2FLO dweeb here:
viewtopic.php?f=5&t=4968
And the extender here:
viewtopic.php?f=5&t=5363
Hope this could help
cheers
pere
I don't know what did I do wrong the first time ...
I have loaded TEST.BIN and then EXEC &HF00 and works flawlessly.
The same applies to the VDK uploaded by sorchard, works with no problems.
This is the procedure I use to put any binary file onto a VDK file:
- Copy the .BIN file to a PC folder
- Using any viewer / hex editor, Look at the bytes 2-3 and 4-5. The 2-3 are the file length, being the 4-5 the load/exec address
both 16 bits. In this case I found these ones: $14D1 and $0F00
These offsets apply only when the binary file has a CoCo-like header (begins with a $00) as is the case.
If it had a Dragon-like header (begins with a $55) then the bytes are: 5-6 (length), 3-4 (load) and 7-8 (exec)
- Start XRoar and attach an empty VDK file (180k) I am attaching a zip that contains a VDK 180-360 and 720k
- Next, load the bin file: Ctrl+L and then choose the desired file
- Finally save the file: SAVE "TEST",&H0F00,&HF00+&H14D1,&H0F00
And that is all you have to do to have the binary file ready to be run from the disc, just by RUN"TEST.BIN"
If you have a drivewire server and any parallel to USB adapter, Tormod's one for instance
viewtopic.php?f=6&t=4270
then you could use my dweeb V2FLO to copy the whole disk to the floppy in the default drive or you could use my extender and
then LINK the VDK to unit 4 and send a BACKUP 4 to 1
You could find the V2FLO dweeb here:
viewtopic.php?f=5&t=4968
And the extender here:
viewtopic.php?f=5&t=5363
Hope this could help
cheers
pere
- Attachments
-
- _DW4 Dragon Empty Discs.zip
- (1.93 KiB) Downloaded 182 times
Re: pcmplay - new dragon sound routine
Pere's solution is much smarter than my hack and creates a file of the correct size so it should load a lot faster.
Stew