Mega Everdrive USB programming

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
jtn0514
Interested
Posts: 17
Joined: Sat Dec 28, 2013 9:33 pm

Mega Everdrive USB programming

Post by jtn0514 » Thu Aug 11, 2016 10:12 pm

Does anyone have an example of writing to the usb port in assembly for the mega everdrive from the megadrive side?

I believe it has write protection of some sorts that has to be disabled before writing to the port but i have not really seen any example of anyone utilizing this just yet.

HardWareMan
Very interested
Posts: 745
Joined: Sat Dec 15, 2007 7:49 am
Location: Kazakhstan, Pavlodar

Re: Mega Everdrive USB programming

Post by HardWareMan » Fri Aug 12, 2016 2:22 am

Why don't you ask a developer?

Natsumi
Very interested
Posts: 82
Joined: Mon Oct 05, 2015 3:00 pm
Location: 0x0
Contact:

Re: Mega Everdrive USB programming

Post by Natsumi » Fri Aug 12, 2016 9:31 am

Ive done a server/client test sometime back. Although its hacky I can share some of the code if you wish. Server is written in C# and client in ASM. I used this to test streaming music files, but the connection is too slow or unreliable to work properly.

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Re: Mega Everdrive USB programming

Post by KanedaFr » Fri Aug 12, 2016 11:20 am

You mean this ?

http://krikzz.com/pub/support/mega-ever ... ssf-v2.txt

it seems you only have to write/read "register" 0xA130E2....for USB

sample available (genny and pc side) : http://krikzz.com/pub/support/mega-ever ... sample.zip

jtn0514
Interested
Posts: 17
Joined: Sat Dec 28, 2013 9:33 pm

Re: Mega Everdrive USB programming

Post by jtn0514 » Thu Oct 06, 2016 2:01 pm

Natsumi wrote:Ive done a server/client test sometime back. Although its hacky I can share some of the code if you wish. Server is written in C# and client in ASM. I used this to test streaming music files, but the connection is too slow or unreliable to work properly.

Yes this would be a tremendous help!

Please pm me if you are willing to share the code. I am able to send data via usb, but receiving is very intermittent.

KRIKzz
Interested
Posts: 27
Joined: Wed Jul 22, 2009 11:25 am
Location: Ukraine
Contact:

Re: Mega Everdrive USB programming

Post by KRIKzz » Thu Mar 02, 2017 10:53 pm

Natsumi wrote:Ive done a server/client test sometime back. Although its hacky I can share some of the code if you wish. Server is written in C# and client in ASM. I used this to test streaming music files, but the connection is too slow or unreliable to work properly.
Actually it should be fast enough for music streaming. Transfer speed around 1MB/s. You should use large enough blocks for transfer (1KB or more). But if your communication protocol every time send few bytes and waiting for response, then speed will be really slow

Natsumi
Very interested
Posts: 82
Joined: Mon Oct 05, 2015 3:00 pm
Location: 0x0
Contact:

Re: Mega Everdrive USB programming

Post by Natsumi » Fri Mar 03, 2017 6:01 am

What I did was, I set the C# code to transfer the entire file at once. 68K side I just kept in a loop reading the data, but I could get it to never sync, and from what I remember it never was able to keep up with the Z80 playback. I also remember that I had issues actually being able to read enough data from the USB as well. It's been a long time since I did this however, there could be a glaring error somewhere which caused this issue, and the code surely could have been much better...

Post Reply