Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Badass - New 6502 Assembler
2020-06-28 17:47
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....
 
2021-04-14 03:49
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.
2021-04-14 21:37
Jammer

Registered: Nov 2002
Posts: 1288
Looks great from the first look! <3
2021-04-14 23:12
Krill

Registered: Apr 2002
Posts: 2800
Quoting map
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.
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.
2021-04-15 15:24
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 ?
2021-04-15 22:24
Zaz

Registered: Mar 2004
Posts: 33
Quoting Krill
Quoting Raistlin
Coding 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...
2021-04-16 00:13
JackAsser

Registered: Jun 2002
Posts: 1981
Quote: Quoting Krill
Quoting Raistlin
Coding 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
2021-04-16 00:15
JackAsser

Registered: Jun 2002
Posts: 1981
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
2021-04-16 15:12
Raistlin

Registered: Mar 2007
Posts: 546
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?
2021-04-16 15:15
Raistlin

Registered: Mar 2007
Posts: 546
“ 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).
2021-04-16 15:49
Jammer

Registered: Nov 2002
Posts: 1288
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
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Durandal
Guests online: 161
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 No Bounds  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 The Ghost  (9.6)
9 No Sprites  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 Party Elk 2  (9.7)
2 Cubic Dream  (9.6)
3 Copper Booze  (9.5)
4 Rainbow Connection  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Onscreen 5k  (9.5)
7 Dawnfall V1.1  (9.5)
8 Quadrants  (9.5)
9 Daah, Those Acid Pil..  (9.5)
10 Birth of a Flower  (9.5)
Top Groups
1 Booze Design  (9.3)
2 Nostalgia  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Musicians
1 Rob Hubbard  (9.7)
2 Jeroen Tel  (9.7)
3 Mutetus  (9.6)
4 Jammer  (9.6)
5 Linus  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.066 sec.