From f63de5614760c2dcd97f7ee38fd354405e675683 Mon Sep 17 00:00:00 2001 From: nicejs-is-cool Date: Sun, 5 Jul 2026 12:36:36 -0300 Subject: [PATCH] add milestones to readme --- README.md | 32 +++++++++++++++++++++++++++++++- src/native/carbon.cpp | 12 ++++++------ 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index db7f5f8..8d07b5d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,34 @@ # Carbon Hydrogen NeoNucleus JNI bindings. ### Dev Setup Notes -Java expects libcarbon.so on the src/native directory. This is the default unless you're not using the Makefile. Make *sure* to build NeoNucleus with `make lib MODE=release`, and place the libneonucleus.a on src/native. The same applies for TLA (testLuaArch), which must be built with `make MODE=release`. \ No newline at end of file +Java expects libcarbon.so on the src/native directory. This is the default unless you're not using the Makefile. Make *sure* to build NeoNucleus with `make lib MODE=release`, and place the libneonucleus.a on src/native. The same applies for TLA (testLuaArch), which must be built with `make MODE=release`. +### Development +Carbon is currently being organized in "milestones", below they are. +#### Milestone 1 +- [x] PointerBackedClass +- [x] testLuaArch included +- [x] Statically linked NeoNucleus +- [x] Null pointer checks +- [x] Lua error in console +#### Milestone 2 +- [ ] On-demand native structs +- [ ] NativeComponent, and java-defined Component(s) +- [ ] Make nn_EEPROM *not* PBC'd. +- [ ] JNIComponentHandler +- [ ] JNI Environment handler +- [ ] Java-side userdata fields +- [ ] Implement ncl screen +- [ ] Prevent more footguns (more error handling, etc...) +#### Milestone 3 +- [ ] Implement all base nn_* functions +- [ ] Implement all ncl_* functions +- [ ] Custom Java architectures (JNI architecture handler) +- [ ] Auto-generate native structs in Java from a JSON file (?) +- [ ] Boot OpenOS +### Milestone 4 (MVP release?) +- [ ] OS tests +- [ ] Carbon C library +- [ ] Fix/add missing javadoc comments +- [ ] Point Makefile to the submodule's files instead of copying them over (for NeoNucleus) +- [ ] Write a working emulator using Carbon *or* Hydrogen (NC-Telnet?) +- [ ] Begin work on Hydrogen \ No newline at end of file diff --git a/src/native/carbon.cpp b/src/native/carbon.cpp index aa7be91..0fc8b18 100644 --- a/src/native/carbon.cpp +++ b/src/native/carbon.cpp @@ -46,10 +46,10 @@ void* Carbon::PointerBacked::GetPointer(JNIEnv * env, jobject obj) { return (void*) ptr; } bool Carbon::PointerBacked::ResetPointer(JNIEnv * env, jobject obj) { - jfieldID id = env->GetFieldID(env->GetObjectClass(obj), "ptr", "J"); - if (id == NULL) return false; - env->SetLongField(obj, id, (jlong) NULL); - return true; + jfieldID id = env->GetFieldID(env->GetObjectClass(obj), "ptr", "J"); + if (id == NULL) return false; + env->SetLongField(obj, id, (jlong) NULL); + return true; } nn_Exit Carbon::archRequestHandler(nn_ArchitectureRequest *req) { GlobalArchState* gstate = (GlobalArchState*)req->globalState; @@ -121,13 +121,13 @@ jobject Carbon::Map::To_nn_ComputerState(JNIEnv* env, nn_ComputerState a) { return NULL; } nn_ComputerState Carbon::Map::From_nn_ComputerState(JNIEnv* env, jobject a) { - jclass clazz = env->FindClass(CARBON_CLASSPATH("nn_ComputerState")); + jclass clazz = env->FindClass(CARBON_CLASSPATH(nn_ComputerState)); jmethodID ordMID = env->GetMethodID(clazz, "ordinal", "()I"); jint value = env->CallIntMethod(a, ordMID); return (nn_ComputerState) value; } jobject Carbon::Map::To_nn_Architecture(JNIEnv* env, nn_Architecture a) { - jclass clazz = env->FindClass("org/neoflock/NeoNucleus/nn_Architecture"); + jclass clazz = env->FindClass(CARBON_CLASSPATH(nn_Architecture)); jmethodID consMID = env->GetMethodID(clazz, "", "(Ljava/lang/String;)V"); jstring str = env->NewStringUTF(a.name); jobject obj = env->NewObject(clazz, consMID, str);