Conversation
| memset(channelPhases, 0, sizeof(channelPhases)); | ||
|
|
||
| running = true; | ||
| BaseType_t res = xTaskCreatePinnedToCore( |
There was a problem hiding this comment.
also would be good to place task handle somewhere as a class field, so u can stop tasks u not need anymore from destructor, something similar in modplayer u've can cause a bug
| memset(RAM,NORAM,RAMSIZE); | ||
| memset(VRAM,NORAM,VRAMSIZE); | ||
|
|
||
| if(Verbose) emu_printf("OK\nLoading ROMs:\nOpening COLECO.ROM..."); |
There was a problem hiding this comment.
seems to be always ok even if bios not present or have not expected name
| void ColecoCore::presentFrame() { | ||
| if (!app || !app->canvas) return; | ||
|
|
||
| app->canvas->draw16bitRGBBitmap(frameOffsetX, frameOffsetY, frameBuffer.data(), SCREEN_WIDTH, SCREEN_HEIGHT); |
There was a problem hiding this comment.
I think this would be slow, maybe consider using canvas->getFramebuffer() and direct memcpy into it, in nes it gave + 10 FPS
There was a problem hiding this comment.
so, fps meter would be good to add for further performance meassurements. actually this pixel rendering part is most heaviest by time
|
|
||
| void emu_printf(char* text) { | ||
| if (!text) return; | ||
| lilka::serial.log("%s", text); |
There was a problem hiding this comment.
actually no need, sdk supports default printf() perror() etc, so I guess we can remove a half of it :)
|
|
||
| void emu_DrawLine(unsigned char* VBuf, int width, int, int line) { | ||
| auto* core = ColecoCore::getActive(); | ||
| if (core) core->drawLine(VBuf, width, line); |
There was a problem hiding this comment.
call -> call -> call -> call ->call -> draw a pixel. slow :)
less calls in a chain better
There was a problem hiding this comment.
moving a pixel can be one instruction on assembly, but with calls u've a lots of stuff like local stack init, path params through register/stack, it's way longer become
There was a problem hiding this comment.
theoretically compiler have to optimize it yup, in fact it works more for c only code and much less with c++, cause at least u've to pass this, right? :D
There was a problem hiding this comment.
I guess, would be good to make it in a way
do cpu emulation ticks launching all that emu logic -> process input -> prepare frame(all at once) -> efficiently copy all result(I guess this is just same 16 bit bitmap so) to our canvas framebuffer -> signal through queueDraw to appmanager
ColecoVision – is a second-generation home video-game console developed by Coleco and launched in North America in August 1982. [Wikipedia]
Lileco – is a basic port of ColecoVision emulator from espMCUME project by Jean-Marc Harvengt.
Works fine:
Known limitations/issues:
Important:
coleco.romand should be placed insdcard/colecofolder. You can dump BIOS from real system or find it somewhere in Internet (e.g. by searching "Compilation of BIOSes for various emulation platforms").Select + Ato check the Lileco help.Tested games:
Pacman, Frogger, Donkey Kong, Burger Time, Boulder Dash


