Homebrew RELEASE C&C - Vanilla Conquer

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,274
Country
Chile
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
 

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
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

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,274
Country
Chile
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,

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
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.
 

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,274
Country
Chile
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
 

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
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!
 

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,274
Country
Chile
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,

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
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.
 

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,274
Country
Chile
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,

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
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.
 

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
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.
 

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
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

capsterx

Well-Known Member
OP
Member
Joined
Oct 14, 2020
Messages
147
Trophies
0
Age
42
XP
481
Country
United States
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

OmniBlade

Member
Newcomer
Joined
Dec 17, 2020
Messages
9
Trophies
0
Age
54
XP
103
Country
United States
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.
 

OmniBlade

Member
Newcomer
Joined
Dec 17, 2020
Messages
9
Trophies
0
Age
54
XP
103
Country
United States
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

General chit-chat
Help Users
    Psionic Roshambo @ Psionic Roshambo: https://m.youtube.com/watch?v=FzVN9kIUNxw +1