New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sp1 sdcc + classic fixes (new) #2006
Conversation
…ns with more than 1 parameter
…y saving IX is needed
…xes pending (WIP)
…(finished, hopefully! :-)
…avoid sprite corruption
@@ -217,6 +217,7 @@ extern void __LIB__ sp1_MoveSprAbs(struct sp1_ss *s, struct sp1_ | |||
extern void __LIB__ sp1_MoveSprRel(struct sp1_ss *s, struct sp1_Rect *clip, void *frame, char rel_row, char rel_col, char rel_vrot, char rel_hrot); | |||
extern void __LIB__ sp1_MoveSprPix(struct sp1_ss *s, struct sp1_Rect *clip, void *frame, uint16_t x, uint16_t y); | |||
|
|||
// hook1 and hook2 must have prototype: void userfunc( uint8_t count, struct sp1_cs *c ) __smallc; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this the case then prototype properly - if there's parsing issues then a typedef void (*sp1_hook_func)( uint8_t count, struct sp1_cs *c ) __smallc
should get around them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function can have __z88dk_fastcall
or not, and the prototype would be different for each (1 parameter vs. 2). The functions calling the hooks can use both types, so in order to be compatible, a void *
pointer needs to be passed.
Thanks for re-doing. Please feel free to delete the classic version as part of this PR and update the |
…lace with newlib ones Old sources in "spectrum" dir have been kept around for the moment, since the zx81 and the ts versions of SP1 reference some files there
…s with newlib ones in build
I have disabled Classic SP1 sources in the build, but the |
@jorgegv is there more to come or should I merge this through? |
It depends on what we need/want. I just ported the Spectrum sources, but when I started porting the other ones, it turned out they are a bit different than the Spectrum ones. There is even one struct that has 1 byte less for TS and ZX81 (for the lack of attributes), so they need a good review. For now, the Spectrum port is working, but the others are still pending, and we can't remove the old sources until TS and ZX81 have been migrated also to the new sources. Also, there is one issue with example So, your choice. Do you have any deadline in mind, @suborb ? P.S. I'm updating the task list to reflect this issues. P.S2: In fact, there are no sources in Newlib-SP1 for platforms other than Spectrum! Does this mean that we should ditch the sources for TS and ZX81? |
Maybe we can just move the TS and ZX81 code to a |
…zx81hr targets, keep in 'deprecated' dir
@suborb Done, you can merge this PR if you wish. If you do, I'll open an issue for tracking the problem with |
This is still in a branch in z88dk and not merged to master yet. |
This PR has the goal of using same SP1 sources from newlib, for compilation with Classic + SDCC. It fixes the mess from PR #1986, which has been withdrawn.
Changes to be done:
spectrum
sources withzx
ones, then removespectrum
directory (old SP1 classic sources)zx81hr
sourcests2068hr
sourcesex5e.c