[Question] Using PokittoSim in Code::Blocks

I have installed Code::Blocks and downloaded the whole pokitto/pokittosim library
I have 2 questions:
First when I change for example the text in the “hello world” example and try to build and rerun it, it seems that everything from the pokitto(sim) library is rebuilt. Is this normal behaviour?

Secondly, when I try the mode13 demo, I only get the screenshot below. Do I need to set some specific options to get this demo working?

1 Like

Yes, that’s normal.

The library will be rebuilt based on the settings each example uses since you can only have one screen mode per program and each program uses different screen modes.

Therefore every time you change a program the whole library is recompiled.

When I try it looks similar

I’m guessing it’e either supposed to do that or there’s a bug.

(Interesting that mine has some kind of blurring/scaling but yours doesn’t.)

From the looks of it @spinal wrote this so he should know if there’s a problem.

I assume that the codeblocks libraries are not as updated as the embitz ones. Mode13 works correctly on hardware so I can only assume that to be the issue.

I think it’s more likely to be something that’s different between the code used for hardware and the code used for software.
I.e. bugs in the simulator.

Ok, good news and bad news.

The good news is that this is how Mode13 looks on a Pokitto:

The bad news is that’s now how it shows up on Windows 8 so someone probably forgot to tune a setting on SDL or something.

hmmmm. I could have sworn @Jonne had said it was working recently…

It was fine when I uploaded it…

SimLCD has changed since then.
It’s possible that some of the changes to lcdRefreshMode13 might be involved.

It seems at one point there was a conflict
Edit: the conflict wasn’t what I thought.

Either way, it’s possible it’s not behaving how it should.
Which games use Mode13?
The best test would be to compile one of those using the new library and see if it’s not working correctly.
If it’s not working correctly then I’ll migrate these posts to #troubleshooting:bug-reports and raise an issue on the Github.

The only game I am aware of right now is my own solitaire game. I don’t want to update pokitto lib until it’s finished though.

How is it that 2 differently named functions would conflict?

I take it you only use mbed online?

Ah, seems the conflict wasn’t what I thought.
It seems the conflict came from mode13 having been removed in the uploaded code.

(It was a git merge conflict, not a C++ conflict.)


Either way that issue still seems to exist.

Nope, embitz offline. I think this is the second time that mode13 has been damaged in merges.

Then I don’t see what’s stopping you from checking, you can have more than one copy of both the PokittoLib and your game without the different copies interfering with each other.

If you just don’t want to show off the changes you’ve made, do you have an old copy of your code somewhere? (e.g. Github)

I will check this in a moment

1 Like

@spinal:

Typo in Pokitto_settings.h, line 282. Internal #defines are intended to be POK_ not PROJ_.

Ie. POK_SCREENMODE is not set. “PROJ_SCREENMODE” is not the correct #define

The reason is to be able to follow #defines set externally (PROJ_) and set internally (POK_)

#if PROJ_MODE13 > 0
#define PROJ_SCREENMODE MODE13
#define POK_COLORDEPTH 8
#define POK_STRETCH 0
#define POK_FPS 30
#endif

Should be:

#if PROJ_MODE13 > 0
#define POK_SCREENMODE MODE13
#define POK_COLORDEPTH 8
#define POK_STRETCH 0
#define POK_FPS 30
#endif

Fixed and pushing to repo

2 Likes

I wasn’t at home.

@jonne Thanks for sorting it out.

2 Likes

@jonne, @Pharap, @spinal thanks for helping me.
I can confirm that the demo is working properly now in the simulator.

3 Likes

Ok. From the way you said it I just thought you were worried about your project getting messed up or being shown early.

That was easier to fix than expected.

That’s always a worry, no matter the project. For example, after adding the above fix, none of my gfx work, or perhaps the palettes, can’t quite tell. Either way, can’t look at it again until after work or even tomorrow :thinking::pensive:

It rarely affects me.

I just dump my stuff on Github and it either gets noticed or it doesn’t.
Usually nobody checks their Github feed and what I’m working on goes unnoticed.
If they notice, it’s only their own suprise they’re spoiling.

(Also I keep multiple copies of the PokittoLib around.)

The best way to check is to try to remember how old your previous copy of the PokittoLib was and look for changes between those dates.

Just re-downloaded pokittolib to be sure I was up to date. Without jonnes fix, mode13 doesn’t load the palette properly (seems not to load all 256 colours and palette doesn’t rotate in the plasma example) and with the fix the program wont get past the volume setting screen.

So it gets stuck on hardware? I will check that