Homebrew RELEASE C&C - Vanilla Conquer

  • Thread starter Thread starter capsterx
  • Start date Start date
  • Views Views 38,183
  • Replies Replies 130
  • Likes Likes 19
Ah, that is a bug, it crashes when it cant find the key mapping. Though it's not very useful without one.
The kemap is located in sdmc:/switch/cnc/keymap.keys
due to a shared codebase and I have not separated them out yet. It should be in the package zip.
Yeah, that was the issue, working now :)

--------------------- MERGED ---------------------------

How can I get this mapping?
Code:
ZL = Left Click
ZR = Right Click
 
Yeah, that was the issue, working now :)

--------------------- MERGED ---------------------------

How can I get this mapping?
Code:
ZL = Left Click
ZR = Right Click

Updated a new release and made this the default. Note that for redalert the mappings are now in switch/redalert/keymap.keys
 
  • Like
Reactions: cucholix
Updated a new release and made this the default. Note that for redalert the mappings are now in switch/redalert/keymap.keys
It seems it still has harcoded mouse right click to r-stick click in https://github.com/capsterx-switch/Vanilla-Conquer/releases/tag/v0-r3.

The file keymap.keys still need to be present in sd:/switch/cnc or else Red Alert crashes.

Also in Red Alert could you configure out something like this:

Code:
TOUCH_MOUSE=TRUE
DOUBLE_TOUCK_KEYBOARD=TRUE
RSTICK_MOUSE=TRUE
DPAD_ARROWS=TRUE
LSTICK_ARROWS=TRUE
MINUS=ESC
PLUS=ENTER
A=SPACE
ZL=MOUSE_RIGHT
L=RIGHT_CONTROL
ZR=MOUSE_LEFT
R=H
B=2
Y=1
X=3
It's my config from RetroArch DOSbox Red Alert
 
Last edited by cucholix,
It seems it still has harcoded mouse right click to r-stick click in https://github.com/capsterx-switch/Vanilla-Conquer/releases/tag/v0-r3.

The file keymap.keys still need to be present in sd:/switch/cnc or else Red Alert crashes.

Also in Red Alert could you configure out something like this:

Code:
TOUCH_MOUSE=TRUE
DOUBLE_TOUCK_KEYBOARD=TRUE
RSTICK_MOUSE=TRUE
DPAD_ARROWS=TRUE
LSTICK_ARROWS=TRUE
MINUS=ESC
PLUS=ENTER
A=SPACE
ZL=MOUSE_RIGHT
L=RIGHT_CONTROL
ZR=MOUSE_LEFT
R=H
B=2
Y=1
X=3
It's my config from RetroArch DOSbox Red Alert

Looks like I somehow didnt get the RA nro updated correctly, I edited the release and it should work now.

For that config it should all be ok, just with one change
L=RIGHT CTRL
should work

Do you want RSTICK click to be nothing or right click? Currently RSTICK_MOUSE will force it to be left click, but expanding that should be easy enough.
 
Do you want RSTICK click to be nothing or right click? Currently RSTICK_MOUSE will force it to be left click, but expanding that should be easy enough.
I’m fine with it doing nothing but doesn’t bother me if a button map is repeated :p
 
I’m fine with it doing nothing but doesn’t bother me if a button map is repeated :P

It's an ever naturally evolving codebase as each game tends to be slightly different and I want a single library that makes it easy to hook in, for the most part. There may be things I can do with double/triple/etc click on the touch screen or perhaps even with other keys, who knows!
 
It’s working correctly now, but still can’t set R=H (so you transport to Home base with just one button) neither set L=RIGHT CTRL to change cursor mode.

The idea is separate into squadrons, so you select a group with ZR, then hold RIGHT CTRL to enter in squadron mode, then you assign a number to that squadron, for example X=Number 1, Y=Number 2, B=Number 3.
 
Last edited by cucholix,
It’s working correctly now, but still can’t set R=H (so you transport to Home base with just one button) neither set L=RIGHT CTRL to change cursor mode.

Did you put the file in sdmc:/switch/redalert/keymap.keys ? I changed it in the last release so cnc and redalert are seperate.
 
Did you put the file in sdmc:/switch/redalert/keymap.keys ? I changed it in the last release so cnc and redalert are seperate.
Right, I deleted cnc folder has I only use RA, it now read the keys from redalert folder correctly, no need for the cnc folder.

When I set R=H if I press R during gameplay the controller stop responding.

Setting X=1, Y=2, B=3 works correctly though
 
Last edited by cucholix,
Right, I deleted cnc folder has I only use RA, it now read the keys from redalert folder correctly, no need for the cnc folder.

When I set R=H if I press R during gameplay the controller stop responding.

Setting X=1, Y=2, B=3 works correctly though

try R=h
and maybe L=CTRL

Have you been able to save/load? I've had off and on results on such.
 
Have you been able to save/load? I've had off and on results on such.
Yes, I have 3 buttons set to chars (1, 2, 3) so I just write 1111 for example and save, since it doesn’t allow empty text box.

Wait, I got error loading a save...
 
Last edited by cucholix,
Yes, I have 3 buttons set to chars (1, 2, 3) so I just write 1111 for example and save, since it doesn’t allow empty text box.

Wait, I got error loading a save...

I think there is a bug in saving, and I dont think it's my modifications. I'll look into it, but who knows.
 
I think there is a bug in saving, and I dont think it's my modifications. I'll look into it, but who knows.

I can confirm this is a bug in the codebase, looks like the original codebase made some assumptions of memory layouts that are not always true.
 
  • Like
Reactions: cucholix
I can confirm this is a bug in the codebase, looks like the original codebase made some assumptions of memory layouts that are not always true.

So it wasnt a memory layout issue. Redalert was using LZO compression where as tiberian was using LCW, even in linux under valgrind the LZO one would segfault. I just switched redalert to use LCW and it seems fine...I couldn't find anything in the code that seemed broken, but I duno, it broke the heap somehow. It does invalidate any save files you might have and makes them incompatible I assume with other versions :(

--------------------- MERGED ---------------------------

So it wasnt a memory layout issue. Redalert was using LZO compression where as tiberian was using LCW, even in linux under valgrind the LZO one would segfault. I just switched redalert to use LCW and it seems fine...I couldn't find anything in the code that seemed broken, but I duno, it broke the heap somehow. It does invalidate any save files you might have and makes them incompatible I assume with other versions :(

And I just realized the lzo compress/decompress was not originally part of the source it was added, so maybe I can replace it with something that works!
 
  • Like
Reactions: mathew77
LZO is part of the original source, it was used in the original RA in the same way it is here, but its a hideously out of date version. If you really wanted to keep supporting it (and realistically there is no reason to), you could try replacing it with the latest minilzo which unfortunately I can't post the direct link to yet.
 
Infact on closer inspection it affects our 64bit builds as well, so we'll be fixing it one way or another ourselves in near future. Also, @capsterx why are you using the RA2 image as your RA icon? Do you not like our lovingly crafted svg icons under resources?
 

Site & Scene News

Popular threads in this forum