User Tools

Site Tools


wswan:guide:wwitch

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
wswan:guide:wwitch [2025/12/31 15:08] – created asiewswan:guide:wwitch [2025/12/31 15:12] (current) – [Differences] asie
Line 7: Line 7:
 ===== Differences ===== ===== Differences =====
  
-  * The WonderWitch target uses the small memory model. As such, far functions are not allowed, and code can only be up to 64 kilobytes in total. +  * The target uses the small memory model. As such, far functions are not allowed, and code can only be up to 64 kilobytes in total. 
-  * Under the WonderWitch environment, the data segment points to SRAM (segment 0x1000), while the stack segment points to console RAM (segment 0x0000). This causes differences in how memory is managed:+  * The target'data segment points to SRAM (segment 0x1000), while the stack segment points to console RAM (segment 0x0000). This causes differences in how memory is managed:
     * Data does not co-exist with console RAM; the full 64 kilobytes is available to the program.     * Data does not co-exist with console RAM; the full 64 kilobytes is available to the program.
     * Local variables are in the stack, which is a different address space than static data. As such, pointers to it require a stack (''%%__seg_ss%%'') or far (''%%__far%%'') address space tag!     * Local variables are in the stack, which is a different address space than static data. As such, pointers to it require a stack (''%%__seg_ss%%'') or far (''%%__far%%'') address space tag!
     * Using the ''%%ws_iram%%'' address space tag for pointers to IRAM (such as tile or screen data) is required.     * Using the ''%%ws_iram%%'' address space tag for pointers to IRAM (such as tile or screen data) is required.
 +  * The target's code segment is dynamic and relocation is not supported. This means far pointers to code cannot be created at compile time, and manual relocations based on the code segment will not work.
  
 ===== Limitations ===== ===== Limitations =====
Line 26: Line 27:
 ==== mkrom images ==== ==== mkrom images ====
  
-As the WonderWitch hardware is expensive and usage of emulators and flash cartridges is more common, particularly on the Western side of the WonderSwan fan community, programs are additionally built as ''%%.ws%%'' ROM images. These are built based on [[https://github.com/OpenWitch/AthenaOS|an open source, clean room reimplementation of FreyaOS]], therefore they do not constitute copyright infringement.+As the WonderWitch hardware is expensive and usage of emulators and flash cartridges is more common, particularly on the Western side of the WonderSwan fan community, programs are additionally built as ''%%.ws%%'' ROM images. These are built based on [[https://github.com/OpenWitch/AthenaOS|an open source, clean room reimplementation of the BIOS and OS]], therefore they do not constitute copyright infringement.
  
 The ''%%wf-wwitchtool mkrom%%'' tool can be used to turn any set of files into a ROM image. The default Makefile will include any files in the ''%%rom0%%'' subdirectory in addition to the program executable. The ''%%wf-wwitchtool mkrom%%'' tool can be used to turn any set of files into a ROM image. The default Makefile will include any files in the ''%%rom0%%'' subdirectory in addition to the program executable.
wswan/guide/wwitch.1767193703.txt.gz · Last modified: by asie