Page 1 of 1

KLog with mega-usb (Mega Everdrive X7) is possible?

Posted: Sat Jun 20, 2020 1:52 pm
by cloudstrifer
Hi!

Can you tell me the address where message is stored?

Code: Select all

//Message Log TEST KLOG
asm("move.w  #0x9E69, 0xC00004");//i
asm("move.w  #0x9E70, 0xC00004");//p
asm("move.w  #0x9E71, 0xC00004");//q
//asm("move.w  #0x9E00, 0xC00004");//display

I found this code by Notaz to read data from cartridge, is possible to use this to read debug messages (KLog)?

Notaz
https://github.com/notaz/megadrive/tree/master/mega-usb

Original
http://krikzz.com/pub/support/mega-ever ... tool/v2.0/

Thank you!

Re: KLog with mega-usb (Mega Everdrive X7) is possible?

Posted: Mon Jun 22, 2020 4:13 am
by themrcul
Hi cloudstrifer,
I'm not sure about the code you have posted sorry, but I have had success sending and receiving data from the MegaEverdrive x7 via USB by following the example code released by Krikzz.

I don't have my codebase here with me at work but I had to modify the ROM header to be like the examples released, from memory it was similar or the same as the Super Street Fighter bank switching header.
Once you do that then the /TIME pin on the cartridge is listened to by the Mega Everdrive and messages can be sent back and forward.
The application on the PC side is set to poll to see if a message is ready and then to read it and visa-versa.

So sending data to and reading data from the /TIME address in memory ($A13000-$A130FF) is the way to go if you want debug messages. The TEST KLOG code below is obviously going to a different memory area which must be listened to by the emulator, no?

Re: KLog with mega-usb (Mega Everdrive X7) is possible?

Posted: Wed Jun 24, 2020 6:18 pm
by cloudstrifer
I will try to use that address and tell you the results.
Address used by Klog don't exists in real hardware.

Thank you!

Re: KLog with mega-usb (Mega Everdrive X7) is possible?

Posted: Wed Jun 24, 2020 11:07 pm
by themrcul
There is an example released by Krikzz that may help you - it does exactly what you are looking for, sending strings of text from the MD to the computer via USB and the other way, strings of text from computer to the MD. It is on his network with the source code provided.
It's the basis of what I used to make my Aseprite Tool for MD work.