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

SGDK only sub forum

Moderator: Stef

Post Reply
cloudstrifer
Very interested
Posts: 95
Joined: Mon Feb 19, 2018 7:31 pm

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

Post by cloudstrifer » Sat Jun 20, 2020 1:52 pm

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!

themrcul
Very interested
Posts: 95
Joined: Fri Apr 15, 2016 2:21 pm

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

Post by themrcul » Mon Jun 22, 2020 4:13 am

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?

cloudstrifer
Very interested
Posts: 95
Joined: Mon Feb 19, 2018 7:31 pm

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

Post by cloudstrifer » Wed Jun 24, 2020 6:18 pm

I will try to use that address and tell you the results.
Address used by Klog don't exists in real hardware.

Thank you!

themrcul
Very interested
Posts: 95
Joined: Fri Apr 15, 2016 2:21 pm

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

Post by themrcul » Wed Jun 24, 2020 11:07 pm

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.

Post Reply