Skip to content

Commit 436f5b1

Browse files
committed
Update README and Logger.c
1 parent 5c9e2e9 commit 436f5b1

File tree

2 files changed

+35
-20
lines changed

2 files changed

+35
-20
lines changed

readme.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# ClassiCube - for Windows on ARM32
2+
3+
ClassiCube is a custom Minecraft Classic and ClassiCube client written in C that works COMPLETELY on WoA32 without ANY ISSUES! Performance will be different for everyone.
4+
5+
## Building
6+
7+
1. Have a cross environment setup for ARM32 Windows (MXE + LLVM-MinGW is what I use) and clone the repository (`git clone https://github.com/armdevvel/ClassiCube --depth=1`)
8+
2. Enter the src folder
9+
3. Run `armv7-w64-mingw32-gcc *.c -o ClassiCube.exe -mwindows -lws2_32 -lwininet -lwinmm -limagehlp -lcrypt32 -ld3d9`
10+
4. Once it's done compiling, you can run the game on Windows on ARM32 or Aarch64 with the following files in a folder together (assuming you used LLVM-MinGW): `libc++.dll`, `libssp-0.dll`, `libunwind.dll`, `libwinpthread-1.dll`, and last but not least, `ClassiCube.exe`.
11+
12+
## Running
13+
14+
Pre-built ARM32 executables will be in the [Releases](https://github.com/armdevvel/ClassiCube/releases) page.
15+
16+
## Feedback
17+
18+
Never be scared to open an issue if you need to ask a question or something is wrong!
19+
20+
# Original README
21+
122
ClassiCube is a custom Minecraft Classic and ClassiCube client written in C that works on Windows, macOS, Linux, Android, FreeBSD, NetBSD, OpenBSD, Solaris, Haiku, and in a browser.
223
**It is not affiliated with (or supported by) Mojang AB, Minecraft, or Microsoft in any way.**
324

src/Logger.c

Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -378,13 +378,7 @@ String_Format4(str, "r24=%x r25=%x r26=%x r27=%x" _NL, REG_GNUM(24), REG_GNUM(25
378378
String_Format4(str, "r28=%x r29=%x r30=%x r31=%x" _NL, REG_GNUM(28), REG_GNUM(29), REG_GNUM(30), REG_GNUM(31)); \
379379
String_Format3(str, "pc =%x lr =%x ctr=%x" _NL, REG_GET_PC(), REG_GET_LR(), REG_GET_CTR());
380380

381-
#define Dump_ARM32() \
382-
String_Format3(str, "r0 =%x r1 =%x r2 =%x" _NL, REG_GNUM(0), REG_GNUM(1), REG_GNUM(2));\
383-
String_Format3(str, "r3 =%x r4 =%x r5 =%x" _NL, REG_GNUM(3), REG_GNUM(4), REG_GNUM(5));\
384-
String_Format3(str, "r6 =%x r7 =%x r8 =%x" _NL, REG_GNUM(6), REG_GNUM(7), REG_GNUM(8));\
385-
String_Format3(str, "r9 =%x r10=%x fp =%x" _NL, REG_GNUM(9), REG_GNUM(10), REG_GET_FP());\
386-
String_Format3(str, "ip =%x sp =%x lr =%x" _NL, REG_GET_IP(),REG_GET(sp,Sp),REG_GET(lr,Lr));\
387-
String_Format1(str, "pc =%x" _NL, REG_GET(pc,Pc));
381+
#define Dump_ARM32()
388382

389383
#define Dump_ARM64() \
390384
String_Format4(str, "r0 =%x r1 =%x r2 =%x r3 =%x" _NL, REG_GNUM(0), REG_GNUM(1), REG_GNUM(2), REG_GNUM(3)); \
@@ -438,7 +432,7 @@ static void PrintRegisters(cc_string* str, void* ctx) {
438432
}
439433
#elif defined CC_BUILD_DARWIN && __DARWIN_UNIX03
440434
/* See /usr/include/mach/i386/_structs.h (macOS 10.5+) */
441-
static void PrintRegisters(cc_string* str, void* ctx) {
435+
static void PrintRegisters(cc_string* str, void* ctx) {
442436
mcontext_t r = ((ucontext_t*)ctx)->uc_mcontext;
443437
#if defined __i386__
444438
#define REG_GET(reg, ign) &r->__ss.__e##reg
@@ -464,7 +458,7 @@ static void PrintRegisters(cc_string* str, void* ctx) {
464458
}
465459
#elif defined CC_BUILD_DARWIN
466460
/* See /usr/include/mach/i386/thread_status.h (macOS 10.4) */
467-
static void PrintRegisters(cc_string* str, void* ctx) {
461+
static void PrintRegisters(cc_string* str, void* ctx) {
468462
mcontext_t r = ((ucontext_t*)ctx)->uc_mcontext;
469463
#if defined __i386__
470464
#define REG_GET(reg, ign) &r->ss.e##reg
@@ -484,11 +478,11 @@ static void PrintRegisters(cc_string* str, void* ctx) {
484478
}
485479
#elif defined CC_BUILD_LINUX || defined CC_BUILD_ANDROID
486480
/* See /usr/include/sys/ucontext.h */
487-
static void PrintRegisters(cc_string* str, void* ctx) {
488-
#if __PPC__ && __WORDSIZE == 32
489-
/* See sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h in glibc */
490-
mcontext_t r = *((ucontext_t*)ctx)->uc_mcontext.uc_regs;
491-
#else
481+
static void PrintRegisters(cc_string* str, void* ctx) {
482+
#if __PPC__ && __WORDSIZE == 32
483+
/* See sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h in glibc */
484+
mcontext_t r = *((ucontext_t*)ctx)->uc_mcontext.uc_regs;
485+
#else
492486
mcontext_t r = ((ucontext_t*)ctx)->uc_mcontext;
493487
#endif
494488

@@ -528,7 +522,7 @@ static void PrintRegisters(cc_string* str, void* ctx) {
528522
}
529523
#elif defined CC_BUILD_SOLARIS
530524
/* See /usr/include/sys/regset.h */
531-
static void PrintRegisters(cc_string* str, void* ctx) {
525+
static void PrintRegisters(cc_string* str, void* ctx) {
532526
mcontext_t r = ((ucontext_t*)ctx)->uc_mcontext;
533527

534528
#if defined __i386__
@@ -543,7 +537,7 @@ static void PrintRegisters(cc_string* str, void* ctx) {
543537
}
544538
#elif defined CC_BUILD_NETBSD
545539
/* See /usr/include/i386/mcontext.h */
546-
static void PrintRegisters(cc_string* str, void* ctx) {
540+
static void PrintRegisters(cc_string* str, void* ctx) {
547541
mcontext_t r = ((ucontext_t*)ctx)->uc_mcontext;
548542
#if defined __i386__
549543
#define REG_GET(ign, reg) &r.__gregs[_REG_E##reg]
@@ -557,7 +551,7 @@ static void PrintRegisters(cc_string* str, void* ctx) {
557551
}
558552
#elif defined CC_BUILD_FREEBSD
559553
/* See /usr/include/machine/ucontext.h */
560-
static void PrintRegisters(cc_string* str, void* ctx) {
554+
static void PrintRegisters(cc_string* str, void* ctx) {
561555
mcontext_t r = ((ucontext_t*)ctx)->uc_mcontext;
562556
#if defined __i386__
563557
#define REG_GET(reg, ign) &r.mc_e##reg
@@ -571,7 +565,7 @@ static void PrintRegisters(cc_string* str, void* ctx) {
571565
}
572566
#elif defined CC_BUILD_OPENBSD
573567
/* See /usr/include/machine/signal.h */
574-
static void PrintRegisters(cc_string* str, void* ctx) {
568+
static void PrintRegisters(cc_string* str, void* ctx) {
575569
struct sigcontext r = *((ucontext_t*)ctx);
576570
#if defined __i386__
577571
#define REG_GET(reg, ign) &r.sc_e##reg
@@ -584,7 +578,7 @@ static void PrintRegisters(cc_string* str, void* ctx) {
584578
#endif
585579
}
586580
#elif defined CC_BUILD_HAIKU
587-
static void PrintRegisters(cc_string* str, void* ctx) {
581+
static void PrintRegisters(cc_string* str, void* ctx) {
588582
mcontext_t r = ((ucontext_t*)ctx)->uc_mcontext;
589583
#if defined __i386__
590584
#define REG_GET(reg, ign) &r.me##reg
@@ -597,7 +591,7 @@ static void PrintRegisters(cc_string* str, void* ctx) {
597591
#endif
598592
}
599593
#endif
600-
static void DumpRegisters(void* ctx) {
594+
static void DumpRegisters(void* ctx) {
601595
cc_string str; char strBuffer[768];
602596
String_InitArray(str, strBuffer);
603597

0 commit comments

Comments
 (0)