From: Lawrence S. <ljs...@us...> - 2020-06-11 02:33:07
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via c62f4d699d928b4d2fc020f28442ec944c6dadad (commit) via bc06a21351b868c654a3a76484fa9fdfae249978 (commit) from ff76e28d68ac374e485c9cf6f60032f6158e5a69 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c62f4d699d928b4d2fc020f28442ec944c6dadad Author: Lawrence Sebald <ljs...@us...> Date: Wed Jun 10 22:32:34 2020 -0400 Don't build things on naomi that we don't need and fix the exports to not cause naomi compile errors. commit bc06a21351b868c654a3a76484fa9fdfae249978 Author: Lawrence Sebald <ljs...@us...> Date: Wed Jun 10 22:29:16 2020 -0400 Fix drawing with minifont. ----------------------------------------------------------------------- Summary of changes: kernel/Makefile | 4 +--- .../dreamcast/{exports.txt => exports-naomi.txt} | 26 ---------------------- .../{exports.txt => exports-pristine.txt} | 0 kernel/arch/dreamcast/hardware/Makefile | 17 +++++++++----- kernel/arch/dreamcast/kernel/Makefile | 4 ++-- kernel/arch/dreamcast/kernel/init.c | 4 +++- kernel/arch/dreamcast/util/minifont.c | 8 +++---- 7 files changed, 21 insertions(+), 42 deletions(-) copy kernel/arch/dreamcast/{exports.txt => exports-naomi.txt} (90%) rename kernel/arch/dreamcast/{exports.txt => exports-pristine.txt} (100%) diff --git a/kernel/Makefile b/kernel/Makefile index 1eba879..e36822a 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -19,7 +19,7 @@ all: subdirs $(STUBS) stubs/kernel_export_stubs.c: exports.txt $(KOS_BASE)/utils/genexports/genexportstubs.sh $< stubs/kernel_export_stubs.c -stubs/arch_export_stubs.c: arch/$(KOS_ARCH)/exports.txt +stubs/arch_export_stubs.c: arch/$(KOS_ARCH)/exports-$(KOS_SUBARCH).txt $(KOS_BASE)/utils/genexports/genexportstubs.sh $< stubs/arch_export_stubs.c include $(KOS_BASE)/Makefile.prefab @@ -30,5 +30,3 @@ clean: clean_subdirs rm -f stubs/*.o stubs/kernel_export_stubs.c stubs/arch_export_stubs.c run: - - diff --git a/kernel/arch/dreamcast/exports.txt b/kernel/arch/dreamcast/exports-naomi.txt similarity index 90% copy from kernel/arch/dreamcast/exports.txt copy to kernel/arch/dreamcast/exports-naomi.txt index 5ad5e7e..801001b 100644 --- a/kernel/arch/dreamcast/exports.txt +++ b/kernel/arch/dreamcast/exports-naomi.txt @@ -60,31 +60,6 @@ vid_screen_shot vmu_pkg_build vmu_pkg_parse -# Bios Font -bfont_set_encoding -bfont_draw_thin -bfont_draw_wide -bfont_draw -bfont_draw_str - -# CD-Rom -cdrom_reinit -cdrom_read_toc -cdrom_read_sectors -cdrom_locate_data_track -cdrom_cdda_play -cdrom_cdda_pause -cdrom_cdda_resume -cdrom_spin_down - -# FlashRom -flashrom_info -flashrom_read -flashrom_write -flashrom_delete -flashrom_get_syscfg -flashrom_get_region - # SPU spu_memload spu_memread @@ -247,4 +222,3 @@ mat_rotate_z mat_rotate mat_perspective mat_lookat - diff --git a/kernel/arch/dreamcast/exports.txt b/kernel/arch/dreamcast/exports-pristine.txt similarity index 100% rename from kernel/arch/dreamcast/exports.txt rename to kernel/arch/dreamcast/exports-pristine.txt diff --git a/kernel/arch/dreamcast/hardware/Makefile b/kernel/arch/dreamcast/hardware/Makefile index d8110eb..6442bfb 100644 --- a/kernel/arch/dreamcast/hardware/Makefile +++ b/kernel/arch/dreamcast/hardware/Makefile @@ -8,7 +8,9 @@ OBJS = hardware.o # BIOS services -OBJS += biosfont.o cdrom.o flashrom.o +ifneq ($(KOS_SUBARCH), naomi) + OBJS += biosfont.o cdrom.o flashrom.o +endif # Sound OBJS += spu.o spudma.o @@ -26,11 +28,14 @@ OBJS += sq.o scif.o OBJS += scif-spi.o sd.o # G1 Bus ATA support -OBJS += g1ata.o - -SUBDIRS = pvr network maple modem - -include $(KOS_BASE)/Makefile.prefab +ifneq ($(KOS_SUBARCH), naomi) + OBJS += g1ata.o +endif +SUBDIRS = pvr maple +ifneq ($(KOS_SUBARCH), naomi) + SUBDIRS += network modem +endif +include $(KOS_BASE)/Makefile.prefab diff --git a/kernel/arch/dreamcast/kernel/Makefile b/kernel/arch/dreamcast/kernel/Makefile index 14c4245..b2d8b00 100644 --- a/kernel/arch/dreamcast/kernel/Makefile +++ b/kernel/arch/dreamcast/kernel/Makefile @@ -40,8 +40,8 @@ authors.h: make_authors.awk arch_exports.o: arch_exports.c -arch_exports.c: ../exports.txt - $(KOS_BASE)/utils/genexports/genexports.sh ../exports.txt arch_exports.c arch_symtab +arch_exports.c: ../exports-$(KOS_SUBARCH).txt + $(KOS_BASE)/utils/genexports/genexports.sh ../exports-$(KOS_SUBARCH).txt arch_exports.c arch_symtab clean: -rm -f banner.h authors.h diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index 7f3b9d8..f878f7a 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -44,9 +44,11 @@ dbgio_handler_t * dbgio_handlers[] = { &dbgio_dcload, &dbgio_dcls, &dbgio_scif, -#endif &dbgio_null, &dbgio_fb +#else + &dbgio_null +#endif }; int dbgio_handler_cnt = sizeof(dbgio_handlers) / sizeof(dbgio_handler_t *); diff --git a/kernel/arch/dreamcast/util/minifont.c b/kernel/arch/dreamcast/util/minifont.c index 0b51407..07325e3 100644 --- a/kernel/arch/dreamcast/util/minifont.c +++ b/kernel/arch/dreamcast/util/minifont.c @@ -19,15 +19,15 @@ int minifont_draw(uint16 *buffer, uint32 bufwidth, uint32 c) { uint16 *cur; if(c < 33 || c > 126) - return (CHAR_WIDTH / 8); + return CHAR_WIDTH; pos = (c - 33) * BYTES_PER_CHAR; for(i = 0; i < CHAR_HEIGHT; ++i) { cur = buffer; - for(j = 0; j < CHAR_WIDTH; ++j) { - byte = minifont_data[pos + j]; + for(j = 0; j < CHAR_WIDTH / 8; ++j) { + byte = minifont_data[pos + (i * (CHAR_WIDTH / 8)) + j]; for(k = 0; k < 8; ++k) { if(byte & (1 << (7 - k))) @@ -40,7 +40,7 @@ int minifont_draw(uint16 *buffer, uint32 bufwidth, uint32 c) { buffer += bufwidth; } - return (CHAR_WIDTH / 8); + return CHAR_WIDTH; } int minifont_draw_str(uint16 *buffer, uint32 bufwidth, const char *str) { hooks/post-receive -- A pseudo Operating System for the Dreamcast. |