Comments (2)
I've finished incorporating the kit into z88dk but it still needs testing. I have not done anything about GG or SC1000 targeting because I'm not sure yet if these machine variations are better served by an independent target.
The kit is configured by editing z88dk/libsrc/_DEVELOPMENT/target/sms/config_devkitSMS.m4 and then re-building the sms library by running "Winmake sms" or "make TARGET=sms" from z88dk/libsrc/_DEVELOPMENT
The kit is compatible with any crt but there is a special one selectable from the compile line with "startup=8" that places the kit's two restarts at 0x08 and 0x18. If this crt is used, the config variables "__SMSLIB_ISRST_SMSCRT0RST08" and "__SMSLIB_ISRST_SMSCRT0RST18" should be set non-zero so that C calls will be routed through the restarts. Other crts must have these set to zero so that calls are made instead of rst.
Differences from devkitSMS itself:
- all functions are written in assembly language
- functions are partitioned into individual source files so that they can be linked individually
- the macros used to specify the binary headers are made inert as z88dk specifies header data via pragmas
- the devkitSMS tools number memory banks in decimal; at this time z88dk is following sega's tech doc and is numbering banks in hexadecimal.
devkitSMS also has a few tools associated with it to help create .sms files from sdcc's minimal output. z88dk is able to create sms files directly from the compile line so these are not necessary. One tool that might nevertheless be useful is "assets2banks" that will try to distribute data to different memory banks compactly. In z88dk it's very easy to manually assign code and data to banks but there is no automatic assignment like this tool performs.
I will be committing some examples in the course of testing.
Typical compile lines:
sccz80:
zcc +sms -vn -startup=8 -clib=new -O3 test.c -o test -create-app -pragma-include:zpragma.inc
sdcc:
zcc +sms -vn -startup=8 -clib=sdcc_iy -SO3 --max-allocs-per-node200000 test.c -o test -create-app -pragma-include:zpragma.inc
where zpragma.inc contains pragmas defining various options. An example here:
// Standard SMS Header
#pragma output SMS_HDR_PRODUCT_CODE = 107026
#pragma output SMS_HDR_VERSION = 1
#pragma output SMS_HDR_REGION = 0x3
#pragma output SMS_HDR_ROM_SIZE = 0x1 // ignored; rom size is always set to 32k
// SDSC Header - not generated if no SDSC pragmas are present
#pragma output SDSC_HDR_VERSION = 1046
#pragma output SDSC_HDR_DATE = 20160131 // if omitted current date is used
#pragma redirect SDSC_HDR_AUTHOR = _author
#pragma redirect SDSC_HDR_NAME = _name
#pragma redirect SDSC_HDR_DESCRIPTION = _description
// Change ORG Address of Banks - the default for all banks is 0x8000
// You would not normally change anything; this is an example only
#pragma output CRT_ORG_BANK_05 = 0x4000 // BANKS are defined from 02 through 1F in hex
In the SDSC header above, "author", "name" and "description" must be const character strings defined in the program.
from z88dk.
Move the bugfixing activity to #145
from z88dk.
Related Issues (20)
- Any type of file IO causes errors with submit.com HOT 15
- (z80asm) wrong representation of 0.0 in -float=zx81
- fwrite hangs depending on buffer size. HOT 5
- Declaring prototype for interrupt handler breaks the handler
- (z80asm) Parse1.c compilation issue for m68k HOT 1
- Far memory support for MSX HOT 11
- [appmake][c128] Capital/Small generated file names HOT 12
- [snap][bug?] How to install the latest z88dk under Ubuntu 21.10? HOT 4
- Compiler and linker hints mess with Eclipse and probably other IDEs HOT 5
- [feature request][devcontainer] No install option HOT 3
- Docker images should be tagged HOT 10
- (z80asm) test fails in SNAPcraft HOT 1
- Merging the lib3d.lib into gfx HOT 16
- Support Tandy-Emeritus
- (z80asm) Pseudo instructions causing trouble HOT 3
- (sccz80) Const initialisation issue HOT 1
- 2.2 does not compile on Fedora 40 HOT 4
- [question] How is z88dk making it possible to parallely build several targets sharing some code? HOT 3
- [bug?] Z88DK versions from the same date: Linux version fails while Windows version is OK HOT 5
- [bug][zx81][wrx] When compiling for zx81 with wrx I now get `undefined symbol: hrg_phase` HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from z88dk.