-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from AnalogMan151/master
Added MCR export, fixed hash output, reorganized project folders
- Loading branch information
Showing
9 changed files
with
223 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
build | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,51 @@ | ||
TARGET = vita-mcr2vmp | ||
ifeq ($(OS),Windows_NT) | ||
TARGET_EXEC ?= vita-mcr2vmp-win | ||
else | ||
UNAME_S := $(shell uname -s) | ||
ifeq ($(UNAME_S),Linux) | ||
TARGET_EXEC ?= vita-mcr2vmp-linux | ||
endif | ||
ifeq ($(UNAME_S),Darwin) | ||
TARGET_EXEC ?= vita-mcr2vmp-macos | ||
endif | ||
endif | ||
|
||
OBJS = aes.o main.o sha1.o | ||
BUILD_DIR ?= ./build | ||
SRC_DIRS ?= ./src ./include | ||
|
||
SRCS := $(shell find $(SRC_DIRS) -name *.cpp -or -name *.c -or -name *.s) | ||
OBJS := $(SRCS:%=$(BUILD_DIR)/%.o) | ||
DEPS := $(OBJS:.o=.d) | ||
|
||
LIBS = -lz | ||
INC_DIRS := $(shell find $(SRC_DIRS) -type d) | ||
INC_FLAGS := $(addprefix -I,$(INC_DIRS)) | ||
|
||
CFLAGS = -s -static -Wall -Wextra -std=c99 | ||
all: $(TARGET) | ||
CPPFLAGS ?= $(INC_FLAGS) -s -static -Wall -Wextra -std=c99 | ||
|
||
$(TARGET): $(OBJS) | ||
@echo "Creating binary $(TARGET)" | ||
$(CXX) $(OBJS) -o $@ $(LIBS) -static -static-libgcc | ||
$(BUILD_DIR)/$(TARGET_EXEC): $(OBJS) | ||
$(CC) $(OBJS) -o $@ $(LDFLAGS) | ||
|
||
%.o: %.cpp | ||
@echo "Compiling $^" | ||
$(CXX) $(CFLAGS) -c $^ -o $@ -static -static-libgcc | ||
# assembly | ||
$(BUILD_DIR)/%.s.o: %.s | ||
$(MKDIR_P) $(dir $@) | ||
$(AS) $(ASFLAGS) -c $< -o $@ | ||
|
||
# c source | ||
$(BUILD_DIR)/%.c.o: %.c | ||
$(MKDIR_P) $(dir $@) | ||
$(CC) $(CPPFLAGS) $(CFLAGS) -c $< -o $@ | ||
|
||
# c++ source | ||
$(BUILD_DIR)/%.cpp.o: %.cpp | ||
$(MKDIR_P) $(dir $@) | ||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $< -o $@ | ||
|
||
|
||
.PHONY: clean | ||
|
||
clean: | ||
@echo "Removing all the .o files" | ||
@$(RM) $(OBJS) | ||
$(RM) -r $(BUILD_DIR) | ||
|
||
mrproper: clean | ||
@echo "Removing binary" | ||
@$(RM) $(TARGET) | ||
-include $(DEPS) | ||
|
||
install: all | ||
@cp $(TARGET) ../bin | ||
MKDIR_P ?= mkdir -p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,24 @@ | ||
# vita-mcr2vmp | ||
by @dots_tb - signs psx mcr files for use with the vita's psp emulator | ||
by [@dots_tb](https://github.com/dots-tb) - signs PSOne MCR files to create VMP files for use with Sony Vita/PSP and exports MCR files from VMP | ||
|
||
With help from the CBPS (https://discord.gg/2nDCbxJ) , especially: | ||
|
||
@AnalogMan151 | ||
|
||
@teakhanirons | ||
[@AnalogMan151](https://github.com/AnalogMan151) | ||
[@teakhanirons](https://github.com/teakhanirons) | ||
|
||
## Usage: | ||
|
||
Drag and drop a PSX MCR save file onto the exe. It will generate a VMP that you may use with your Vita's PSP emulator. | ||
Drag and drop a PSOne MCR save file onto the program. It will generate a VMP that you may use with your Vita/PSP. | ||
You may also drag and drop a VMP file and extract the contained MCR file for editing or sharing. | ||
|
||
Or use CMD: | ||
|
||
./vita-mcr2vmp mem.mcr | ||
./vita-mcr2vmp <memorycard.mcr|SCEVMC*.VMP> | ||
|
||
## Further Instructions: | ||
|
||
### I wanna edit my PSX Save Data from the vita! | ||
|
||
1. Grab your save data from here: ux0:/pspemu/PSP/SAVEDATA/<titleid>/SCEVMC<0|1>.VMP | ||
2. Open your save data on the computer with a hexeditor and delete the first 0x80, this will convert it to an MCR. | ||
3. Save it as <name>.MCR. | ||
4. You may now use it with your save editor or emulators(I think) of choice. | ||
5. Follow the USAGE section to convert it back to a VMP. Make sure you place it back to the same location with the same file name. | ||
6. ENJOY! | ||
2. Run VMP file through program to export MCR. | ||
3. You may now use it with your save editor or emulators of choice. | ||
4. Follow the USAGE section to convert it back to a VMP. Make sure you place it back to the same location with the same file name. | ||
5. ENJOY! |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,6 @@ void SHA1Final( | |
void SHA1( | ||
char *hash_out, | ||
const char *str, | ||
int len); | ||
unsigned int len); | ||
|
||
#endif /* SHA1_H */ |
File renamed without changes.
Oops, something went wrong.