Thinking seriously jump to MSX-C / Pascal / ASM

Page 1/3
| 2 | 3

By AxelStone

Prophet (2674)

AxelStone's picture

02-03-2015, 09:55

Hi everybody. During last weeks I've been learning MSX-Basic and I'm facing a small project made in Turbo Basic. With the help of people of this forum I've made progress, but I'm reaching a point where 10Kb limitation in turbo block is becoming a serious problem.

I'd like to finish it in Turbo Basic, since I'm very confortable programming in Basic, but if 10Kb limitation does not allow me to advance I'm thinking about jump to another language and port all code. As far as I know there are 3 solid options:
1.- MSX-C, high level language so it's good for general purpose.
2.- Pascal, idem.
3.- ASM, ideal for action / arcade but perhaps not best option to make RPG / Strategy.

I prefer general purpose languages, so options 1 & 2 are preferable. Can someone summarize pros / cons of every option?

Thanks.

Login or register to post comments

By Daemos

Paragon (1670)

Daemos's picture

02-03-2015, 14:46

I cannot give you pros and cons on the 3 languages, they all work but from experience as a real mathemathical blind person that never managed to understand a thing of coding, ASM is really the easiest to understand once you get the hang of it. It is straightforward and does exactly what you want it to do. It is fast and opens a world of system resources that you could only dream of. While C does the same I find C complex to learn with all those dependicies and compilers requiring all kinds of instructions but thats because I am number blind. My opinion: forget about option 2. choose between option 1 and 3 depending on how your brains work. Both options will take you about 2 years to learn if you have a good mentor/willpower/project to work on. Start small, join a big project with patient people in them and learn. Before you know it you will be making your awesome game in C or ASM. There are more ASM people I think (but I cannot prove that its just a assumption) so ASM will have more people around to learn you the stuff.

All that option 1 and 2 require is willpower thats all. If you are a person of willpower don't worry go for it.

By AxelStone

Prophet (2674)

AxelStone's picture

02-03-2015, 14:55

Daemos wrote:

Both options will take you about 2 years to learn

Crying Crying Crying In Turbo Basic it only took 3 weeks to start making my game Crying Crying Crying . I know that ASM is really the only choice to have full access to hardware resources, but since I'm very used to structured language I'm very interested in C / Pascal. On the other hand as I say I look for a general purpose language that allows me to create any genre: action-arcade, RPG, strategy... I don't want to learn several languages (ASM for arcades, C for RPGs, etc), I want to learn only one and use it for all genres, and I supposse that ASM is really hard to make complex logical as required for strategy game, maybe?

One question, why you suggest not even try Pascal? It's perhaps abandoned? Thanks Wink

By Daemos

Paragon (1670)

Daemos's picture

02-03-2015, 15:07

Quote:

Crying Crying Crying In Turbo Basic it only took 3 weeks to start making my game Crying Crying Crying

ok ok I was a little too dramatic on that one. Within 2 years you will be able to make a game like SMW, write romloaders and cool systemtools. You start to really understand how that machine works. Its like getting your black belt for ASM. You can start making cool programs within 3 weeks if you see the light.

Quote:

One question, why you suggest not even try Pascal? It's perhaps abandoned? Thanks Wink

I cannot support that one with facts. Its my opinion. I feel that pascal is like trying to escape from basic by going from one high level language to another. I bet its going to give you alot more space to get things done but why not directly put your time and effort in the language that gives you the most possibilities? Remember that your first project will be cool but the next one will be even cooler because you have the freedom to make whatever you want.

By AxelStone

Prophet (2674)

AxelStone's picture

02-03-2015, 16:41

Daemos wrote:

I cannot support that one with facts. Its my opinion. I feel that pascal is like trying to escape from basic by going from one high level language to another. I bet its going to give you alot more space to get things done but why not directly put your time and effort in the language that gives you the most possibilities? Remember that your first project will be cool but the next one will be even cooler because you have the freedom to make whatever you want.

Ok, your vote goes to ASM Wink . I suppose that it's the only way to have SMW running on MSX2, in C you hardly could get such performance in arcades. Well since Pascal not seems very used by comunity the list is reduced to ASM or C.

By ericb59

Paladin (859)

ericb59's picture

02-03-2015, 16:46

@Axelstone : I've never understand ASM, but I know it's the best way for making cool things on MSX.
I'm programmer, and can play with 3 or 4 languages on my job, but I never had courage to jump into ASM !
The fact is for me ASM looks very obscur, and since I cannot find someone to explain me, how to do, and how all thoses things works with real examples, I will not start to learn it...
The key, is to have someone with you to learn. Or very good tutorials...

Anyway, about you current project with Kun Basic, i'm quite sure you can find some tricks to break the 10K limits.
Try to move some routines outside the Turbo Bloc. Make more little turbo Blocks instead of one big Turbo Block.

By edoz

Prophet (2171)

edoz's picture

02-03-2015, 16:54

Maybe programming for SymbOS with Unify (former SymBasic) is an option for you Wink

Desgin mode:

Code:

Design other project:

Code:

project:

But this project also uses ML (you can combine in Unify)

Other benefit is that your applications will run on the CPC computer, MSX and Enterprise system. ;)
And you can combine the controls that already exits in SymbOS.

It depend on your needs what you want to make.. but i love this environment ... it is almost the same if you program in .NET ;)
You can only use it when you want to program for SymbOS :D

By syn

Paragon (1920)

syn's picture

02-03-2015, 17:11

The BASICS of ASM are pretty easy to understand if you have good tutorials or better someone to explain it to you either in real life or chat. I made a small techdemogame in about 2 months I think and that was with me slacking hard in between (aka not coding/studying every day due to other stuff that needed my attention Wink )

But you need to be aware that total understanding of the MSX hardware is needed to do anything in ASM because you are really sending bits and bytes to various parts/chips of the msx, so even though the basic principes of asm is relatively easy to understand, the hard part is learning about all the ins and outs of the system

I dont see what you mean with ASM not ideal for RPGs or C not suited for action games.. There are many examples for those.

Quote:

ASM is really hard to make complex logical as required for strategy game,

What makes it so complex to code this in asm compared to say, basic? Imho its just some flowcharts/conditions that you need to translate from your head to code, what type of code doesnt matter..

By konamiman

Paragon (1041)

konamiman's picture

02-03-2015, 17:22

C is a wonderful language for MSX development as long as you are not developing action games or something that needs to squeeze up to the last clock cycle from the Z80. Compared to pure assembler it makes bigger and slower programs, true; but development is A LOT easier and faster. From some time ago I am developing all my sowftare in C, except for really critical components such as the Nextor kernel (but even then, Nextor's integrated FDISK tool is written in C!)

My advice is to give C a try. Keep in mind also that you can always write in assembler those parts of your program that are too slow or too big; writing a small chunk of assembler is much more affordable than writing a whole application!

As for the C compiler, I use SDCC, mainly because nowadays it's a lot easier for me to develop using a PC and to test using an emulator than to use a real MSX for that (but mind you, I always test my software in my real Turbo-R before releasing it!) and even more important, I have access to proper source code control tools.

If you are going to take a look at SDCC, check out the SDCC section in my web too, as there are some useful resources.

By AxelStone

Prophet (2674)

AxelStone's picture

02-03-2015, 17:22

edoz wrote:

Maybe programming for SymbOS with Unify (former SymBasic) is an option for you Wink

Wow, it's really impressive. However it's more like a script language, not a programming language, maybe?

ericb59 wrote:

@Axelstone : I've never understand ASM, but I know it's the best way for making cool things on MSX.
I'm programmer, and can play with 3 or 4 languages on my job, but I never had courage to jump into ASM !

Anyway, about you current project with Kun Basic, i'm quite sure you can find some tricks to break the 10K limits.
Try to move some routines outside the Turbo Bloc. Make more little turbo Blocks instead of one big Turbo Block.

Just my case. I'm programmer and I've used a lot of languages during my life (Basic, C, Pascal, Java, etc) but most of them are high level languages. I feel very confortable using them (this was the main reason because I started with MSX-Basic), so I'm sure that MSX-C / Pascal should be easy to learn. I don't mind any of them, I should choice the one more extended in the MSX comunity in order to share knowledge.

I assure that I'm using all tricks I know, but it's really hard adjust it to 10Kb onlye oO

syn wrote:

I dont see what you mean with ASM not ideal for RPGs or C not suited for action games.. There are many examples for those.

I mean that game logic is much more easy to program in C, it's almost direct from your head. In ASM is all more "obscure". On the other hand, ASM has more performance so is better for action games. However I will not learn 2 languages, so I don't mind to make an action game in C.

Thanks for your opinions men.

By edoz

Prophet (2171)

edoz's picture

02-03-2015, 17:32

AxelStone wrote:

Wow, it's really impressive. However it's more like a script language, not a programming language, maybe?

No .. you are wrong about that .. it is the Unify language where you can combine ML and Unify.
That is compiled to pure assembly.

Page 1/3
| 2 | 3