WHDLoad MantisBT - WHDLoad
View Issue Details
0005155WHDLoad[All Projects] Generalpublic2021-04-23 23:192024-05-26 23:13
Assigned ToWepl 
PlatformOSOS Version
Product Version18.6 
Target VersionFixed in Version 
ChipMem2 MB
FastMem0 MB
WorkbenchOS 3.9
KickROM40 - Kick 3.1
Summary0005155: Allow all vampires cards users to use joypad with more than 2 buttons
DescriptionThe apollo vampire team made a choice to patch the lowlevel.library for allowing more than 2 buttons (instead of using the CD32 patch register technique for example). See informations here : https://github.com/flype44/VControl/blob/master/DOCUMENTATION.md#vcontrol-joyport

As a result:
- all games using directly the hardware will never be able to use more than 2 buttons
- but all games using the lowlevel.library to read the input control can work.

But right now, they don't work with WHDLoad because when WHDload starts, it loads a non patched version of the lowlevel.library.

Would it be possible to:
- either add a "configuration hook" to allow vampire users to inject a patched version of the lowlevel.library
- or, if not possible, to provide a dedicated version of the whdload executable for the vampire ?

Steps To ReproduceOn a apollo vampire card, launch any games that requires more than 2 buttons with whdload
Additional Informationna
TagsNo tags attached.
Attached Files

2021-04-24 00:05   
that isn't so simple

all slaves use dedicated joypad read code. whdload doesn't have any control read code (maybe time to add some...)

then, the code for this patch isn't public right?

finally would need some testing but none of us has access to Vampire
2021-04-24 15:45   
I didn't want to imply that my request is easy to implement, sorry if I have not been clear about that.

I don't know much about how whdload is built, but if some controllers read code could be added, it would be great and probably would serve more purposes than just the one I based my request on.

It would really be a whdload new feature, not specific to the vampire.

Now, from the vampire perspective, unless I'm mistaken, the patch of the lowlevel.library published by the apollo team is open source (https://github.com/flype44/VControl/blob/master/V_JOYPORT.asm)

for the testing, I guess it's not ideal if none of the developers have access to a vampire... Correct me if I'm wrong, but the "vampire specific part" of the new feature would be minimal ? Maybe I could help with the final testing of this vampire part... let me know what you think.
2021-04-24 15:50   
(Last edited: 2021-04-24 15:51)
With the source, yes, it's very easy to implement. But I can't test. And @wepl is the whdload developper not me.

Of course it would require refitting ALL installs using the joypad read routine, but that's not really a problem with some scripting.

2021-04-24 16:34   
I am against adding vampire only features for several reasons:
As far as I'm aware, none of the currently active people involved in creating patches and neither Bert (the WHDLoad coder) has such hardware. This means, whenever someone reports a bug, no one will be able to debug/reproduce it. And I for one will never ever buy a Vampire card.

A WHDLoad version for Vampire only cards doesn't make much sense to me either.

In the end, Bert has to decide, but I doubt such features will be added anytime soon, if ever.
2021-04-24 17:10   
I completely agree with you, that's why my request is to be able to "inject" a custom joypad read routine in whdload.

the implementation of the routine (to make it work with the vampire) would be out of scope of whdload so you won't have to test it.

Some other users may implement different versions of the routine if they want (for example to replace the up direction by a button press).

That's why I think this feature would be very useful, way beyond the vampire need.
2021-04-24 23:05   
As JOTD already noted every install would need to be adapted to support this. This can't expected and I myself would not spend time on adapting my installs for this.
Nevertheless a resload function to check the controller states would be useful and was already thought about. This would allow to encapsulate this specific in WHDLoad.
I will try to discuss such a API extension with the other developers.
2024-05-26 23:13   
I have now added a resload_ReadJoyPort function to WHDLoad.
I can make this function support the vampire feature.
As I have no V4 is there somebody for testing?
https://github.com/flype44/VControl/blob/master/V_JOYPORT.asm contains relevant information, but is there also a real documentation for this feature?

Issue History
2021-04-23 23:19quack75New Issue
2021-04-24 00:05JOTDNote Added: 0010087
2021-04-24 15:45quack75Note Added: 0010089
2021-04-24 15:50JOTDNote Added: 0010090
2021-04-24 15:50JOTDAssigned To => Wepl
2021-04-24 15:50JOTDStatusnew => assigned
2021-04-24 15:51JOTDNote Edited: 0010090bug_revision_view_page.php?bugnote_id=10090#r1377
2021-04-24 16:34StingRayNote Added: 0010091
2021-04-24 17:10quack75Note Added: 0010092
2021-04-24 23:05WeplNote Added: 0010094
2024-05-26 23:13WeplNote Added: 0013722