| |
Sasq
Registered: Apr 2004 Posts: 155 |
Badass - New 6502 Assembler
The last couple of months I've created a new 6502 Assembler called bass (or Badass).
The basic idea is for it to be as advanced as Kickassembler, but with a less complex, more unified syntax.
And it also has unit tests in an internal emulator.
You can find it at https://github.com/sasq64/bass
I've started a tutorial here: http://apone.org/bass/part1.html
Here is an example C64 source http://apone.org/bass/example.asm.html |
|
... 106 posts hidden. Click here to view all posts.... |
| |
map
Registered: Feb 2002 Posts: 27 |
Quoting Krill
But an open and generic tool for that would be nice, and possibly included with an actual assembler.
I totally agree that it would be nice to have such a tool. Maybe even nicer to have the possibility to combine it with the assembler of your choice instead of having it build into a certain assembler only. |
| |
Jammer
Registered: Nov 2002 Posts: 1333 |
Looks great from the first look! <3 |
| |
Krill
Registered: Apr 2002 Posts: 2940 |
Quoting mapI totally agree that it would be nice to have such a tool. Maybe even nicer to have the possibility to combine it with the assembler of your choice instead of having it build into a certain assembler only. That's a good point.
Another would be that it can take quite long to generate good solutions to the problem (which is quite often NP-complete or worse), and you'd want to keep intermediate artefacts for speedier rebuilds and retain some manual control over the process. Pretty similar to synthesised netlists in FPGA/PLD stuff. |
| |
Sasq
Registered: Apr 2004 Posts: 155 |
So if you had something like this, how far would that get you? :
!delay <cycles>, <regs_to_preserve>
!merge <section1>, <secition2>, <max_cycles>
Where merge was allowed to insert any code in the delay "slots"
as long as registers where preserved ? |
| |
Zaz Account closed
Registered: Mar 2004 Posts: 33 |
Quoting KrillQuoting RaistlinCoding all of this, and keeping within memory budgets, is quite a task ;-) Top Coders
1 Raistlin (9.8)
2 Graham (9.8)
3 Crossbow (9.8) That top spot don't come from nothin'. =)
Well, I did most of the things mentioned and some others 8 years ago, such as https://csdb.dk/release/?id=121570, so the coder rating can't be just from mastering cycle exact code generation ;-)
To be more on topic, I don't think this kind of feature is something for the assembler, the problem is of a different kind. The code generation for this needs to know where all the multiplexed sprites are, as well as the bad lines... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: Quoting KrillQuoting RaistlinCoding all of this, and keeping within memory budgets, is quite a task ;-) Top Coders
1 Raistlin (9.8)
2 Graham (9.8)
3 Crossbow (9.8) That top spot don't come from nothin'. =)
Well, I did most of the things mentioned and some others 8 years ago, such as https://csdb.dk/release/?id=121570, so the coder rating can't be just from mastering cycle exact code generation ;-)
To be more on topic, I don't think this kind of feature is something for the assembler, the problem is of a different kind. The code generation for this needs to know where all the multiplexed sprites are, as well as the bad lines...
"Well, I did most of the things mentioned and some others 8 years ago, such as https://csdb.dk/release/?id=121570, so the coder rating can't be just from mastering cycle exact code generation ;-)"
It's defined by "food, right now". ;)
@Raistilin: Love u, so no offence! <3 |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: So if you had something like this, how far would that get you? :
!delay <cycles>, <regs_to_preserve>
!merge <section1>, <secition2>, <max_cycles>
Where merge was allowed to insert any code in the delay "slots"
as long as registers where preserved ?
Regs to preserve might be a nice annotation. In my merger I tracked LDA-ish instructions to know if a reg became dirty.
Also elaborate on merge!
Typically you have one code chunk with speed code and another one with raster code with timing critical parts. The speed code should be interleaved with the raster code and maintain 1) raster code timing and 2) register usage on speed code. To ease up constraints one might ignore a) branch penalties 2) char fetch DMA and 3) sprite DMA |
| |
Raistlin
Registered: Mar 2007 Posts: 625 |
This does seem like something that’s not really for the compiler ... a separate tool that spits out ASM files might work. I have that now in a sense - but it’s not a generic solution, I have some C++ helper libraries and then I’ll typically have one C++ file per demo effect that I create using this - that C++ creating all my needed data files, pre-visualisations of the effect, etc etc. Those C++ files can run pretty huge ... my C++ skills aren’t the best - but, well, they’re just for me - and it’s the resultant ASM that matters ;-)
As said, though, I don’t think it’s particularly the merging of code that people might need help with ... it’s also what that 2 branches of code is in the first place - and how to try to reduce register usage in a way that 2 different sets of code can run without lots of register saving and reloading. How will a generalised merge tool work well with that I wonder? |
| |
Raistlin
Registered: Mar 2007 Posts: 625 |
“ the coder rating can't be just from mastering cycle exact code generation ;-)”
The charts on CSDb don’t make a whole lot of sense - and particularly break down when there are lower vote counts. Feel free to downvote me and mould the chart how you think it should be. I don’t take much notice nor care to it tbh. No Crest demos in the top 10, for instance, is a crime against humanity... me being placed higher than HCL and Axis is also utter madness - but unsustainable (wait till there are 20 votes cast). |
| |
Jammer
Registered: Nov 2002 Posts: 1333 |
LOL, I'm in coders' TOP5?! WTF?! I can't even cycle :D |
Previous - 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 - Next |