{"id":2960,"date":"2021-07-24T15:09:04","date_gmt":"2021-07-24T12:09:04","guid":{"rendered":"https:\/\/demensdeum.com\/blog\/?p=2960"},"modified":"2024-12-16T22:32:23","modified_gmt":"2024-12-16T19:32:23","slug":"writing-stuff-in-assembly-for-sega-genesis-2","status":"publish","type":"post","link":"https:\/\/demensdeum.com\/blog\/hi\/2021\/07\/24\/writing-stuff-in-assembly-for-sega-genesis-2\/","title":{"rendered":"Writing Assembler for Sega Genesis #2"},"content":{"rendered":"<p>In this note I will describe how to load colors into the Sega palette in assembler.<br \/>The final result in the Exodus emulator will look like this:<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-2964\" src=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2021\/07\/result.png\" alt=\"\" width=\"804\" height=\"652\" srcset=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2021\/07\/result.png 804w, https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2021\/07\/result-300x243.png 300w, https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2021\/07\/result-768x623.png 768w\" sizes=\"auto, (max-width: 804px) 100vw, 804px\" \/><br \/>\nTo make the process easier, find a pdf online called <strong>Genesis Software Manual (1989)<\/strong>, it describes the whole process in great detail, in fact, this note is a commentary on the original manual.<\/p>\n<p>In order to write colors to the VDP chip of the Sega emulator, you need to do the following:<\/p>\n<ul>\n<li>Disable TMSS protection system<\/li>\n<li>Write the correct parameters to the VDP registers<\/li>\n<li>Write the desired colors to CRAM<\/li>\n<\/ul>\n<p>For assembly we will use vasmm68k_mot and a favorite text editor, for example echo. Assembly is carried out by the command:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-unknown\" data-lang=\"unknown\"><code><h3>\u041f\u043e\u0440\u0442\u044b VDP<\/h3>\n<p>VDP \u0447\u0438\u043f \u043e\u0431\u0449\u0430\u0435\u0442\u0441\u044f \u0441 M68K \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0430 \u043f\u043e\u0440\u0442\u0430 \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u043c\u044f\u0442\u0438 &#8211; \u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0438 \u043f\u043e\u0440\u0442 \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>\n\u041f\u043e \u0441\u0443\u0442\u0438:<\/p>\n<ol>\n<li>\u0427\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u043c VDP.<\/li>\n<li>\u0422\u0430\u043a\u0436\u0435 \u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0435\u043c \u043d\u0430 \u0442\u0443 \u0447\u0430\u0441\u0442\u044c VDP (VRAM, CRAM, VSRAM etc.) \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442 \u0434\u0430\u043d\u043d\u044b\u0445<\/li>\n<\/ol>\n<p><em>\u0418\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f: \u0421\u0435\u0433\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u043b\u0430 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u044c \u0441 \u0438\u0433\u0440\u0430\u043c\u0438 Master System, \u043d\u0430 \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 MODE 4 \u0438\u0437 \u043c\u0430\u043d\u0443\u0430\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430, \u0432 \u043d\u0435\u043c VDP \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0436\u0438\u043c Master System.<\/em><\/p>\n<p>\u041e\u0431\u044a\u044f\u0432\u0438\u043c \u043f\u043e\u0440\u0442\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0438 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-unknown\" data-lang=\"unknown\"><code>vdp_data_port        = $C00000<\/code><\/pre>\n<h3>\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0437\u0430\u0449\u0438\u0442\u044b TMSS<\/h3>\n<p>\u0417\u0430\u0449\u0438\u0442\u0430 \u043e\u0442 \u043d\u0435\u043b\u0438\u0446\u0435\u043d\u0437\u0438\u043e\u043d\u043d\u044b\u0445 \u0438\u0433\u0440 TMSS \u0438\u043c\u0435\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0447\u0442\u043e\u0431\u044b \u0434\u043e \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a VDP \u0432 \u0430\u0434\u0440\u0435\u0441\u043d\u043e\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 A1 \u043b\u0435\u0436\u0430\u043b\u0430 \u0441\u0442\u0440\u043e\u043a\u0430 \u201cSEGA\u201d.<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-unknown\" data-lang=\"unknown\"><code>MOVE.B A1,D0; \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0435\u0440\u0441\u0438\u044e \u0445\u0430\u0440\u0434\u0432\u0430\u0440\u044b \u0446\u0438\u0444\u0440\u043e\u0439 \u0438\u0437 A1 \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 D0 \nANDI.B 0x0F,D0; \u041f\u043e \u043c\u0430\u0441\u043a\u0435 \u0431\u0435\u0440\u0435\u043c \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0431\u0438\u0442\u044b, \u0447\u0442\u043e\u0431\u044b \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u0435 \u0441\u043b\u043e\u043c\u0430\u0442\u044c \nBEQ.B SkipTmss; \u0415\u0441\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044f \u0440\u0430\u0432\u043d\u0430 0, \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u044d\u0442\u043e \u044f\u043f\u043e\u043d\u043a\u0430 \u0438\u043b\u0438 \u044d\u043c\u0443\u043b\u044f\u0442\u043e\u0440 \u0431\u0435\u0437 \u0432\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u0433\u043e TMSS, \u0442\u043e\u0433\u0434\u0430 \u0438\u0434\u0435\u043c \u0432 \u0441\u0430\u0431\u0440\u0443\u0442\u0438\u043d\u0443 SkipTmss \nMOVE.L \"SEGA\",A1; \u0418\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0441\u0442\u0440\u043e\u043a\u0443 SEGA \u0432 A1 \n<\/code><\/pre>\n<\/div>\n<h3>Write the correct parameters to the VDP registers<\/h3>\n<p>Why set the correct parameters in the VDP registers at all? The idea is that the VDP can do a lot, so before drawing you need to initialize it with the necessary features, otherwise it simply won't understand what you want from it.<\/p>\n<p>Each register is responsible for a specific setting\/operating mode. The Sega manual specifies all the bits\/flags for each of the 24 registers, and a description of the registers themselves.<\/p>\n<p>Let's take ready-made parameters with comments from the bigevilcorporation blog:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-unknown\" data-lang=\"unknown\"><code>\nVDPReg0:   dc.b $14 ;  0: H interrupt on, palettes on \nVDPReg1:   dc.b $74 ;  1: V interrupt on, display on, DMA on, Genesis mode on \nVDPReg2:   dc.b $30 ;  2: Pattern table for Scroll Plane A at VRAM $C000 \n                    ;     (bits 3-5 = bits 13-15) \nVDPReg3:   dc.b $00 ;  3: Pattern table for Window Plane at VRAM $0000 \n                    ;     (disabled) (bits 1-5 = bits 11-15) \nVDPReg4:   dc.b $07 ;  4: Pattern table for Scroll Plane B at VRAM $E000 \n                    ;     (bits 0-2 = bits 11-15) \nVDPReg5:   dc.b $78 ;  5: Sprite table at VRAM $F000 (bits 0-6 = bits 9-15) \nVDPReg6:   dc.b $00 ;  6: Unused \nVDPReg7:   dc.b $00 ;  7: Background colour - bits 0-3 = colour, \n                    ;     bits 4-5 = palette \nVDPReg8:   dc.b $00 ;  8: Unused \nVDPReg9:   dc.b $00 ;  9: Unused \nVDPRegA:   dc.b $FF ; 10: Frequency of Horiz. interrupt in Rasters \n                    ;     (number of lines travelled by the beam) \nVDPRegB:   dc.b $00 ; 11: External interrupts off, V scroll fullscreen, \n                    ;     H scroll fullscreen \nVDPRegC:   dc.b $81 ; 12: Shadows and highlights off, interlace off, \n                    ;     H40 mode (320 x 224 screen res) \nVDPRegD:   dc.b $3F ; 13: Horiz. scroll table at VRAM $FC00 (bits 0-5) \nVDPRegE:   dc.b $00 ; 14: Unused \nVDPRegF:   dc.b $02 ; 15: Autoincrement 2 bytes \nVDPReg10:  dc.b $01 ; 16: Vert. scroll 32, Horiz. scroll 64 \nVDPReg11:  dc.b $00 ; 17: Window Plane X pos 0 left \n                    ;     (pos in bits 0-4, left\/right in bit 7) \nVDPReg12:  dc.b $00 ; 18: Window Plane Y pos 0 up \n                    ;     (pos in bits 0-4, up\/down in bit 7) \nVDPReg13:  dc.b $FF ; 19: DMA length lo byte \nVDPReg14:  dc.b $FF ; 20: DMA length hi byte \nVDPReg15:  dc.b $00 ; 21: DMA source address lo byte \nVDPReg16:  dc.b $00 ; 22: DMA source address mid byte \nVDPReg17:  dc.b $80 ; 23: DMA source address hi byte, \n                    ;     memory-to-VRAM mode (bits 6-7)  \n<\/code><\/pre>\n<\/div>\n<p>Okay, now let's go to the control port and write all the flags to the VDP registers:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-unknown\" data-lang=\"unknown\"><code>    move.l  #VDPRegisters,a0 ; \u041f\u0438\u0448\u0435\u043c \u0430\u0434\u0440\u0435\u0441 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 A1 \n    move.l  #$18,d0          ; \u0421\u0447\u0435\u0442\u0447\u0438\u043a \u0446\u0438\u043a\u043b\u0430 - 24 = 18 (HEX) \u0432 D0 \n    move.l  #$00008000,d1    ; \u0413\u043e\u0442\u043e\u0432\u0438\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 VDP \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 0, \u043f\u043e \u043c\u0430\u043d\u0443\u0430\u043b\u0443 - 1000 0000 0000 0000 (BIN) = 8000 (HEX) \n\nFillInitialStateForVDPRegistersLoop: \n    move.b  (a0)+,d1         ; \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u0432 D1 \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 VDP \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043d\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0432 \u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f VDP  \n    move.w  d1,vdp_control_port     ; \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0438\u0442\u043e\u0433\u043e\u0432\u0443\u044e \u043a\u043e\u043c\u0430\u043d\u0434\u0443 + \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0437 D1 \u0432 \u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f VDP \n    add.w   #$0100,d1        ; \u041f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 VDP \u043d\u0430 1 (\u0431\u0438\u043d\u0430\u0440\u043d\u043e\u0435 \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u0435 +1 \u043a \u0438\u043d\u0434\u0435\u043a\u0441\u0443 \u043f\u043e \u043c\u0430\u043d\u0443\u0430\u043b\u0443 \u0421\u0435\u0433\u0438) \n    dbra    d0,FillInitialStateForVDPRegistersLoop ; \u0423\u043c\u0435\u043d\u044c\u0448\u0430\u0435\u043c \u0441\u0447\u0435\u0442\u0447\u0438\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432, \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0446\u0438\u043a\u043b \u0435\u0441\u043b\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e<\/code><\/pre>\n<p>\u0421\u0430\u043c\u043e\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043c\u0430\u043d\u0443\u0430\u043b \u0438 \u043f\u043e\u043d\u044f\u0442\u044c \u0432 \u043a\u0430\u043a\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u043f\u043e\u0434\u0430\u044e\u0442\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f, \u043e\u043f\u044b\u0442\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u0440\u0430\u0437\u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0441\u0440\u0430\u0437\u0443, \u0430 \u0432\u043e\u0442 \u043d\u0435\u043e\u043f\u044b\u0442\u043d\u044b\u0435&#8230; \u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u0443\u043c\u0430\u044e\u0442 \u0438 \u043f\u043e\u0439\u043c\u0443\u0442, \u0447\u0442\u043e \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<p>0B100(5 \u0431\u0438\u0442 &#8211; \u0438\u043d\u0434\u0435\u043a\u0441 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430)(8 \u0431\u0438\u0442\/\u0431\u0430\u0439\u0442 &#8211; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435)<\/p>\n<p>0B1000001001000101 &#8211; \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 VDP 2 (00010), \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0444\u043b\u0430\u0436\u043a\u043e\u0432 01000101.<\/p>\n<h3>\u0417\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0446\u0432\u0435\u0442\u0430 \u0432 CRAM<\/h3>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0438\u0434\u0435\u043c \u043f\u0438\u0441\u0430\u0442\u044c \u0434\u0432\u0430 \u0446\u0432\u0435\u0442\u0430 \u0432 \u043f\u0430\u043c\u044f\u0442\u044c \u0446\u0432\u0435\u0442\u043e\u0432 CRAM (Color RAM). \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u0438\u0448\u0435\u043c \u0432 \u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u0446\u0432\u0435\u0442\u0443 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 0 \u0432 CRAM \u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e \u0434\u0430\u0442\u0430 \u043f\u043e\u0440\u0442\u0443 \u0446\u0432\u0435\u0442. \u0412\u0441\u0435!<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-unknown\" data-lang=\"unknown\"><code>    move.l  #$C0000000,vdp_control_port ; \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0446\u0432\u0435\u0442\u0443 \u043f\u043e \u0438\u043d\u0434\u0435\u043a\u0441\u0443 0 \u0432 CRAM \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f  \n    move.w  #228,d0; \u0426\u0432\u0435\u0442 \u0432 D0 \n    move.w  d0,vdp_data_port; \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0446\u0432\u0435\u0442 \u0432 \u043f\u043e\u0440\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \n<\/code><\/pre>\n<\/div>\n<p>After building and running in the emulator in Exodus, you should have a screen filled with color 228.<\/p>\n<p>Let's fill it with a second color, at the last byte 127.<\/p>\n<p><code><\/code><\/p>\n<div class=\"hcb_wrap\">\n<pre class=\"prism line-numbers lang-unknown\" data-lang=\"unknown\"><code>  move.l  #$C07f0000,vdp_control_port ; \u0414\u043e\u0441\u0442\u0443\u043f \u043a \u0446\u0432\u0435\u0442\u0443 \u043f\u043e \u0431\u0430\u0439\u0442\u0443 127 \u0432 CRAM \u0447\u0435\u0440\u0435\u0437 \u043f\u043e\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \n  move.w  #69,d0; \u0426\u0432\u0435\u0442 \u0432 D0 \n  move.w  d0,vdp_data_port; \u041e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0446\u0432\u0435\u0442 \u0432 \u043f\u043e\u0440\u0442 \u0434\u0430\u043d\u043d\u044b\u0445 \n<\/code><\/pre>\n<\/div>\n<h3>Links<\/h3>\n<p><a href=\"https:\/\/gitlab.com\/demensdeum\/segagenesissamples\" target=\"_blank\" rel=\"noopener\">https:\/\/gitlab.com\/demensdeum\/segagenesissamples<\/a><br \/><a href=\"https:\/\/www.exodusemulator.com\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.exodusemulator.com\/<\/a><br \/>\n<a href=\"http:\/\/sun.hasenbraten.de\/vasm\/\" target=\"_blank\" rel=\"noopener\">http:\/\/sun.hasenbraten.de\/vasm\/<\/a><br \/>\n<a href=\"https:\/\/tomeko.net\/online_tools\/bin_to_32bit_hex.php?lang=en\" target=\"_blank\" rel=\"noopener\">https:\/\/tomeko.net\/online_tools\/bin_to_32bit_hex.php?lang=en<\/a><\/p>\n<h3>Sources<\/h3>\n<p><a href=\"https:\/\/namelessalgorithm.com\/genesis\/blog\/genesis\/\" target=\"_blank\" rel=\"noopener\">https:\/\/namelessalgorithm.com\/genesis\/blog\/genesis\/<\/ a><br \/><a href=\"https:\/\/plutiedev.com\/vdp-commands\" target=\"_blank\" rel=\"noopener\">https:\/\/plutiedev.com\/vdp-commands<\/a><br \/>\n<a href=\"https:\/\/huguesjohnson.com\/programming\/genesis\/palettes\/\" target=\"_blank\" rel=\"noopener\">https:\/\/huguesjohnson.com\/programming\/genesis\/palettes\/<\/a><br \/>\n<a href=\"https:\/\/www.chibiakumas.com\/68000\/helloworld.php#LessonH5\" target=\"_blank\" rel=\"noopener\">https:\/\/www.chibiakumas.com\/68000\/helloworld.php#LessonH5<\/a><br \/>\n<a href=\"https:\/\/blog.bigevilcorporation.co.uk\/2012\/03\/09\/sega-megadrive-3-awaking-the-beast\/\" target=\"_blank\" rel=\"noopener\">https:\/\/blog.bigevilcorporation.co.uk\/2012\/03\/09\/sega-megadrive-3-awaking-the-beast\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this note I will describe how to load colors into the Sega palette in assembler.The final result in the Exodus emulator will look like this: To make the process easier, find a pdf online called Genesis Software Manual (1989), it describes the whole process in great detail, in fact, this note is a commentary<a class=\"more-link\" href=\"https:\/\/demensdeum.com\/blog\/hi\/2021\/07\/24\/writing-stuff-in-assembly-for-sega-genesis-2\/\">Continue reading <span class=\"screen-reader-text\">&#8220;Writing Assembler for Sega Genesis #2&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[61,52],"tags":[165,174],"class_list":["post-2960","post","type-post","status-publish","format-standard","hentry","category-techie","category-tutorials","tag-asm","tag-vasm","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"hi","enabled_languages":["en","ru","zh","de","fr","ja","pt","hi"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"ru":{"title":true,"content":true,"excerpt":false},"zh":{"title":true,"content":true,"excerpt":false},"de":{"title":true,"content":true,"excerpt":false},"fr":{"title":true,"content":true,"excerpt":false},"ja":{"title":true,"content":true,"excerpt":false},"pt":{"title":true,"content":true,"excerpt":false},"hi":{"title":false,"content":false,"excerpt":false}}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/posts\/2960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/comments?post=2960"}],"version-history":[{"count":21,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/posts\/2960\/revisions"}],"predecessor-version":[{"id":3897,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/posts\/2960\/revisions\/3897"}],"wp:attachment":[{"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/media?parent=2960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/categories?post=2960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/tags?post=2960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}