Search found 718 matches

by Sik
Fri Nov 16, 2018 8:25 pm
Forum: Megadrive/Genesis
Topic: Looping access from 68K and Z80
Replies: 12
Views: 215

Re: Looping access from 68K and Z80

I recall that trying to access the bank window from the 68000 side results in a hang up so huh, I do believe it indeed maps to the Z80 bus. Besides making it not be the case would probably make the whole thing more complex as it'd be working on exceptions to the rule instead. What kind of test ROM w...
by Sik
Fri Nov 16, 2018 8:17 pm
Forum: Hardware
Topic: Controllers and wrong I/O pin directions
Replies: 7
Views: 142

Re: Controllers and wrong I/O pin directions

I mean, most games only support controllers and misbehave the moment you connect anything else, so not checking for anything not explicitly supported isn't unusual. Some more for that list: Printer returns 0x0A Saturn controller returns 0x0B Other Saturn peripherals return 0x05 (keyboard, multitap, ...
by Sik
Thu Nov 15, 2018 9:04 pm
Forum: Megadrive/Genesis
Topic: Looping access from 68K and Z80
Replies: 12
Views: 215

Re: Looping access from 68K and Z80

You sure? YM2612 is on $A04000+ because it's accessed through the Z80 bus (where it's at $4000+). It seems $A0xxxx is a gate to the whole Z80 bus area. It's generally acknowledged that any sort of loop (68000-to-Z80-to-68000 bus) is bound to result in a hang up, but yeah I don't think the exact mech...
by Sik
Thu Nov 15, 2018 8:12 pm
Forum: Hardware
Topic: Controllers and wrong I/O pin directions
Replies: 7
Views: 142

Re: Controllers and wrong I/O pin directions

Except that only works for Sega's own peripherals and not any of the third party ones. EA multitap is detected by meddling with port 2 and seeing what shows up in port 1, Miracle Piano keyboard is detected by configuring the I/O pins for the piano, sending a MIDI command and wait to see if it sends ...
by Sik
Tue Nov 13, 2018 5:09 am
Forum: SGDK
Topic: An error check in the 3 line handshake
Replies: 12
Views: 355

Re: An error check in the 3 line handshake

Gonna continue that discussion here to avoid more derailing:
viewtopic.php?f=13&t=2936
by Sik
Tue Nov 13, 2018 5:08 am
Forum: Hardware
Topic: Controllers and wrong I/O pin directions
Replies: 7
Views: 142

Controllers and wrong I/O pin directions

Continuing from these posts: http://gendev.spritesmind.net/forum/viewtopic.php?p=34165#p34163 Pins on the controller port can be both inputs and outputs and some devices expect the direction to be set different from what a normal controller configuration uses. If two outputs get connected together y...
by Sik
Mon Nov 12, 2018 4:06 pm
Forum: SGDK
Topic: An error check in the 3 line handshake
Replies: 12
Views: 355

Re: An error check in the 3 line handshake

Pins on the controller port can be both inputs and outputs and some devices expect the direction to be set different from what a normal controller configuration uses. If two outputs get connected together you will have one or both sides getting damaged sooner or later. Reminds me, apparently the 3-...
by Sik
Sat Nov 10, 2018 2:39 pm
Forum: SGDK
Topic: An error check in the 3 line handshake
Replies: 12
Views: 355

Re: An error check in the 3 line handshake

Yes, the risk of harming the hardware is the issue. Some plugs are made so that GND gets connected first but the Mega Drive's plug is not one of those. Worse yet, the shape of the plug makes the pins wear out easily if you're constantly plugging and unplugging (probably a bigger problem, even!). Min...
by Sik
Thu Nov 08, 2018 3:46 am
Forum: SGDK
Topic: An error check in the 3 line handshake
Replies: 12
Views: 355

Re: An error check in the 3 line handshake

Doing the check only when you set the support flags means it won't work with hotplugging (I know, it's a bad idea to hotplug in the first place, but it's doable and people will keep doing it…). You really want to do the check every time it goes look at the peripheral (or at least, whenever SGDK beli...
by Sik
Thu Oct 11, 2018 8:37 am
Forum: Megadrive/Genesis
Topic: simple 68k loop
Replies: 21
Views: 1435

Re: simple 68k loop

and this one doesnt save bytes, it looks like it's unrolled at build time .rept 62 dc.l _INT .endr But that's precisely what you want (there are 64 vectors, two of those are reset and entry point, the rest are interrupts). But yeah, that's pretty much the same thing dcb would do. Anyway, there's wh...
by Sik
Tue Oct 09, 2018 7:03 pm
Forum: Megadrive/Genesis
Topic: simple 68k loop
Replies: 21
Views: 1435

Re: simple 68k loop

All this thread and not a single person mentioned dcb.l? (which is basically dc.l in repeat) This is the same thing as 62 dc.l _INT in a row: dcb.l 62, _INT ...although I admit I'm not sure if GAS supports it, given how it loves to ignore established syntax (even if it doesn't, pretty sure it must h...
by Sik
Mon Oct 01, 2018 4:26 pm
Forum: Megadrive/Genesis
Topic: IO access differences in MD mode vs SMS
Replies: 4
Views: 377

Re: IO access differences in MD mode vs SMS

Yeah, I/O port accesses don't do anything. The memory map is completely changed between MD and SMS modes (Z80 outright uses the 68000 bus in SMS mode, that should give a good idea of how heavily it changes - I assume this is so mappers can see accesses to their registers?). Also if I recall correctl...
by Sik
Tue Sep 25, 2018 2:34 am
Forum: Megadrive/Genesis
Topic: 68k edge case: btst dN,#immed
Replies: 11
Views: 919

Re: 68k edge case: btst dN,#immed

How many instructions accept immediate as destination? Admittedly I'm just as clueless, but I wouldn't be surprised if that turns out to play a factor into it.
by Sik
Tue Sep 18, 2018 4:33 pm
Forum: Megadrive/Genesis
Topic: Neat programming trick for optional operations
Replies: 3
Views: 490

Re: Neat programming trick for optional operations

Yep, ADD D0, D0 pushes the high bit of D0 into carry flag, which then can be checked with a branch. If you know the next bit to check is on the MSB and don't mind modifying the value it's faster than doing BTST (ADD.W is 4 cycles, BTST is 8 off the top of my head). The trick is normally used when re...
by Sik
Tue Sep 18, 2018 3:00 pm
Forum: Controls
Topic: Mega Mouse Usage
Replies: 23
Views: 4532

Re: Mega Mouse Usage

The drift issue would still happen without the hacked resolution (you can get the mouse to report a large enough motion to trigger the bug).