Skip to content

Commit

Permalink
shared font change
Browse files Browse the repository at this point in the history
  • Loading branch information
burhanr13 committed Jan 7, 2025
1 parent 05243b8 commit 0a3476c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/srv.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void init_services(E3DS* s) {
srvobj_init(&s->services.apt.shared_font.hdr, KOT_SHAREDMEM);
s->services.apt.shared_font.defaultdata = SHARED_FONT_DATA;
s->services.apt.shared_font.defaultdatalen = SHARED_FONT_DATA_len;
s->services.apt.shared_font.vaddr = 0x1b000000;
s->services.apt.shared_font.vaddr = 0x20000000;
s->services.apt.shared_font.size = SHARED_FONT_DATA_len;
srvobj_init(&s->services.apt.capture_block.hdr, KOT_SHAREDMEM);
s->services.apt.capture_block.size = 4 * (0x7000 + 2 * 0x19000);
Expand Down
8 changes: 6 additions & 2 deletions src/svc.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ DECL_SVC(MapMemoryBlock) {
if (shmem->defaultdata) {
memcpy(PTR(addr), shmem->defaultdata, shmem->defaultdatalen);
}

R(0) = 0;
}

Expand Down Expand Up @@ -461,13 +461,17 @@ DECL_SVC(GetProcessInfo) {

R(0) = 0;
switch (type) {
case 0x02:
R(1) = s->process.used_memory;
R(2) = 0;
break;
case 0x14: // linear memory address conversion
R(1) = FCRAM_PBASE - LINEAR_HEAP_BASE;
R(2) = 0;
break;
default:
R(0) = -1;
lerror("unknown process info");
lerror("unknown process info 0x%x", type);
break;
}
}
Expand Down
19 changes: 2 additions & 17 deletions sys_files/shared_font.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,8 @@
// apt presumably sets the first word to 2 when it is finished loading

unsigned char SHARED_FONT_DATA[] = {
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x43, 0x46, 0x4e, 0x54, 0xff, 0xfe, 0x14, 0x00, 0x00, 0x00, 0x00, 0x03,
0x02,
[0x80] = 0x43, 0x46, 0x4e, 0x54, 0xff, 0xfe, 0x14, 0x00, 0x00, 0x00, 0x00, 0x03,
0xe6, 0xd4, 0x2f, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x49, 0x4e, 0x46,
0x20, 0x00, 0x00, 0x00, 0x01, 0x1e, 0x96, 0x1c, 0x00, 0x18, 0x18, 0x01,
0x3c, 0x00, 0x00, 0x00, 0x08, 0x08, 0x2f, 0x00, 0xfc, 0x5f, 0x2f, 0x00,
Expand Down

0 comments on commit 0a3476c

Please sign in to comment.