-
Notifications
You must be signed in to change notification settings - Fork 21
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
Suggested enhancements #87
Comments
This is on the roadmap.
This is too. I'm now surprised that I forgot to implement it yet.
What is your use case and what would the benefits be over just having two normal functions? Millfork in general tries to be transparent, like C or Java.
Sound like a good idea. But what exactly do you mean, like if you have a segment $2000-$2FFF with bank id=1, another $3000-$3FFF also with bank id=1, and the output file contains $2000-$3FFF? This would require that the segments with the same bank id don't overlap, and there can be gaps between segments if the declared address range is too large. Is this what you meant?
Currently, there are separate operators, but I guess it's easy to forget which variable is should be treated as decimal and which as binary. I'll think about it. I'm working on a feature I'm tentatively calling optimization hints, which will work like annotations in other languages. I guess that instead of polluting the type system with types like
Agreed, that should be changed. |
Fantastic. It's not the biggest deal, certainly not a dealbreaker by any means, but in my particular use, for example in C64 tile maps, where a tile is an array of sixteen bytes and a tileset contains up to 256 tiles, you can imagine why I'd miss being able to express it that way.
If you never needed to use it, it's completely understandable that it slipped your mind. I only noticed its absence because I develop for a 512KB banked ROM cart on the C64.
Convenience, mostly -- for example, on the C64, sprite position information for the X coordinate is split between the low byte and the highest bit, with the high bit in a shared byte -- it would be very convenient and make my code more readable if I could just say something like this:
and then access it as if it were just another variable, with the compiler just translating it into calls to _sprite_0_x_get_u16() and _sprite_0_x_set_u16(newValue) or the like. It's not a must-have, just something I really, really liked in Swift that I think is an easy fit into most other languages.
I mean that, for example, if I assign segments prg2 and prg3 to bank 2, and they don't overlap, and their total length plus the gap between doesn't exceed the length I set as the bank length in the .ini file, then they would be spat out into the bank's output at the appropriate distance from one another, with the bank's fill value between them. It's just an extension of what Millfork already does inside each segment, brought up one conceptual level, to make organizing my segments in banks easier.
Good enough for me. Just something like
Awesome. Thanks for taking feedback so well. I'm not the best at giving it, but it's nice to be heard. |
+1 for adding the ability to put arrays in structs. For example in the Atari Lynx example code, the SCB struct should really have an array of 8 ubytes for the palette mapping values. |
Holy crow, thank you! This is going to make my job so much easier with my game! |
I'm liking what I'm learning of Millfork so far, but there are a couple things that I've wished it had.
The text was updated successfully, but these errors were encountered: