Congratulations and thanks to openMSX developers

Page 1/2
| 2

By krazyminer

Resident (33)

krazyminer's picture

08-06-2018, 19:51

Hello!

I am basically a C guy, but used sensibly, I can see that C++ surely has many useful features. I have read some of openMSX source and tried to learn about C++ 2011 features such as unique_ptr, auto keyword and so on. It is slowly coming together.

It seems to me that openMSX is exceptionally clean code, structured beatifully and written using a consistent layout. This is just a beginning of my investigations, but the whole idea of having having XML documents for describing machines and peripherals is a fantastic idea! It is my goal to gain some kind of understanding of how openMSX constructs the emulated machines based on XML descriptions. Yeah, the code seems very nice indeed!

Have a nice weekend, everybody! Smile

Login or register to post comments

By Manuel

Ascended (14780)

Manuel's picture

09-06-2018, 00:08

Thanks a lot for the compliments! If you have any questions, feel free to ask them.
Feel free to contribute at some point as well, of course.

By krazyminer

Resident (33)

krazyminer's picture

09-06-2018, 00:29

Manuel wrote:

Thanks a lot for the compliments! If you have any questions, feel free to ask them.
Feel free to contribute at some point as well, of course.

You're welcome. I just studied the openMSX code for two hours againg, trying to figure out the class structure. It seems very good, closely mirroring the structure of real machine. If I understood correctly, the MSXMotherboard class is very important, you use addDevice() to build the machines according to the XML files. So clean and logical.

I am not very familiar with C++, so I am taking some notes concerning the language as I read. I still have many features to figure out.

I do have one simple question concerning C++ 2011. There are two comments in the code saying:

"order of unique_ptr's is important"

But the comments do not state the *reason*. I wonder why is the order important? Maybe the comment could be expanded with "because..."? Or is this just elementary C++ that everyone should know?

By Manuel

Ascended (14780)

Manuel's picture

09-06-2018, 09:00

I'll have to look that up, but I don't think it's language specific, more design specific in this case.

By krazyminer

Resident (33)

krazyminer's picture

09-06-2018, 23:12

Manuel wrote:

I'll have to look that up, but I don't think it's language specific, more design specific in this case.

All right. By the way, I just got C++ Programming Language as PDF. It is 4th edition. I cannot believe this book is over 1300 pages! LOL!

I had the third edition, but lent it to a former band mate over ten years ago, and she never gave it back. But in any case, I have very little experience with C++.

By Manuel

Ascended (14780)

Manuel's picture

10-06-2018, 22:23

I wouldn't learn C++ from that book by Stroustrup. It's a horrible read... If you want to know details on things, check cppreference.com or sites like that.

By krazyminer

Resident (33)

krazyminer's picture

10-06-2018, 23:51

Manuel wrote:

I wouldn't learn C++ from that book by Stroustrup. It's a horrible read... If you want to know details on things, check cppreference.com or sites like that.

Stroustrup's C++ Programming Language book has received an average 4.5 out of 5 in amazon.com user reviews. I think I have read almost all of the 3rd edition, but of course just reading it through and then not using the language in 10 years is not enough to learn C++ properly. You must use it to get it. I have read some C++ code during these years, but not much.

C++ language seems to be too large, it has so many features it is astounding...

Stroustrup's book starts out slowly, it contains a long and detailed history/rationale part that could probably have been shorter. I have read 94 pages of the 4th edition by now.

Site cppreference.com looks to be good, but I think it is more a reference (like the name implies) than a tutorial. With all those C++ features, it is nice to see some example code and down-to-earth explanations. I suppose Bjarne will provide those.

By SdC

Resident (38)

SdC's picture

10-07-2018, 19:23

I've also been looking at the code, and exploring the options. Oh yes, and playing an old game or two Smile. And can't tell you how much I can appreciate the obvious skill, dedication and eye for detail. Hip hip hoera from me too! Thank you very much.

By ARTRAG

Enlighted (6029)

ARTRAG's picture

10-07-2018, 19:30

+1

By Manuel

Ascended (14780)

Manuel's picture

11-07-2018, 00:16

Thanks guys, that means a great deal to us!

By gdx

Prophet (2350)

gdx's picture

11-07-2018, 00:30

Yes, thanks to the team!

Page 1/2
| 2
My MSX profile