Hi everybody. Thank you for joining us today. I know it's just post-lunch and people's tummies are full But you know we promise to have this engaging conversation with you all and the panelists and hopefully we'll be able to take some valuable nuggets back home You know so the topic for today is leveraging customer data and personalization strategies for purpose driven marketing, right? We are living in a very evolving world where everything is super rapid consumers are becoming super demanding Their expectations have increased So, you know, it's become very important for businesses to sort of leverage data in a very meaningful way, right and Data is a word that is thrown You know quite a bit around but what does it really mean to actually unify this data Right collect this data and do something impactful with it, right? So just to start with, you know, I wanted to actually throw like an open question to the panel Maybe we can start with you the pender just wanted to understand You know how are you leveraging customer data for purpose driven marketing? And what are the strategies if you can give us some real-time experiences to leverage this data and use this data effectively? so So it's very important for us to understand that, you know Personalization is super critical in a business, right? Specifically a business which spans over 40 cities and over 50 specialties So a person reaching out to me for a speciality a cannot land on speciality My communication cannot be incorrect So my data starts from the point when a person so being a very data for A digital first company So we are able to track what the person is searching from the point of starting our data journey starts there That from there. Where is he going? What is he doing on a website? And what all actions has he taken? and Every time that you know There are data interpretations that need to be taken out that you know What is a person looking for and what are you showing him and is that even useful for that person? So if let's say I am looking for a hospital and you are going to talk about That you know, we have This is the cost of a surgery or a treatment that is there A person will not be in will not be interested in it. You have that data point with it You got to use that you got to use that in a way that benefits your customer and your business It cannot be that you know That I will only do this for the customer giving way too much information and not do the business It's that you have to leverage that data in a right manner So that you are able to guide him throughout that journey because the journeys are complex And there are multiple touch points specifically in our business. There are There is a touch point where a person gets in touch with the Coordinator for Mars and there's a touch point where he gets in touch with Our doctors there is a touch point where he is Entering into a past in our hospital So at every point We have that data available with them that you know, what is the communication? How do we leverage that? What are the issues that are being faced by the customers and how are we solving them? So it's not only just the part of the how to begin the journey, but also How we're making the journey more and more comfortable around it Absolutely, I think very good points there, you know, we as marketers are the first touch point when it comes to data in a company, right? So we I guess we have to take this to sort of drive the business on right coming to you Aisha, you know, you have seen this industry very closely and you have a lot of sort of clients You know who leverage different kinds of data. So what are the trends that you are seeing? You know in this ecosystem today Thanks to nisha for the opening question and I'm very happy to be part of this amazing panel discussing the topic Which is very close to a researcher's heart So at NEPA we are of course a research firm a consumer science firm So this topic as much as or the theme is as much of an opportunity In the ecosystem is also a confusing place to be in specifically being a data firm Because the words purpose and personalization have brought in reverse trends in research To quote some examples, we are seeing that A personalization the rule of personalization says that treat people not like data number but like like a human identity Now it's easier said but then done we're seeing that As much as quantitative data A lot of big segmentation and a lot of quantitative work That has been the pulse of research industry I have been saying a come back for a lot of exploratory and qualitative understanding a whole lot more Which is understanding humans understanding and being part of those group conversations being very close To the pulse of the consumer because data is honestly now everywhere and there are multiple sources The other thing that I'm also seeing at least from a agency point of view is that the collaboration between the clients and agencies like Much stronger because it's about going beyond data. It's about looking at gut plus combined with data And seeing that okay a particular You know quote unquote a number could be a 57% of people did so and so but what beyond What is the psyche? What does neuroscience say? What are the other facets of data and methodology is really tying up? So I think personalization and purpose has brought all of that upfront in consumer science and research as an industry Okay, thanks so much for that. Isha, you know ishvander over to you. You're in a very very interesting industry You know, I'm sure everybody's sitting here is quite interested in the industry that you are a part of So when it comes to you and your industry, how are you leveraging the data? Right? I'm sure there are certain You know aspects to the data that may be You know that that may have like sort of a thin line, but how are you leveraging this data? It'll be good to know so So what I would do is I would say we should stop it. It's a very very important piece Look, we do have certain data points So we don't look at that, but if you agree This is better Okay, thanks a lot I think it's important to call out that certain parts of data points are regulated in the street But I think what's important is the conversation which isha was talking about and I'll talk about it as a market here There's a very important fundamental piece here Which is That there is a lot of data which is out there Okay if you're creating And this tons of raw data If not rightly looked at if right not rightly segmented and if the right insights are not derived It will lead to a stage where you look at the scale of data and it could paralyze you and we've seen that happen in a lot of projects Okay, where you have so much data and you say, okay for how do I make sense out of this? But the nuances in the data Which start telling you, okay, this is a potential area Which comes out of qualitative or quantitative? And then when you put a qualitative lens around it, okay, and go deeper into finding the insight is where the magic happens Uh And that's where the difference really comes. Okay, because Frankly, it's not just I who have that data today The systems the processes the tools across organizations would be pretty similar. We all have access to Okay, all of it. We all would have prime tracks. We all would have very similar tools out there But how do you find that consumer insight which gives you a unique differentiated space? Is what? You need to move ahead of data. So data married with human intuition is where the differentiation comes for successful companies If you just look at data in isolation I mean I was I was just joking with dependent a little bit before that If I says 30 degrees is it good or it's bad You don't know the deficits 30 degrees to somebody who's in Rajasthan Versus if I says 30 degrees to somebody who's in London The reactions would be very different. So setting that context and putting that qualitative lens is extremely important You know ishwinder, that's a very interesting point that you made there and I definitely like to touch upon You know, where do you find the right balance between human intuition and data? Right because with great data comes great responsibility also So I'd really love to touch upon that but before that joy deep, you know, over to you I'd love to know how you leverage data at adda 52 Soon everybody and it's a pleasure to be here on this panel. Actually, I would agree with a lot of points raised here by Isha and Ishwinder The data plays a very very important role, but till the time you apply the layer of qualitative Insights on it. There's precious little you can do with data And and I actually have the privilege of coming from organizations where You have really a lot of data which comes in Very quickly and you can act on it, right now. How does data help you? data helps you with making You know a communication to consumers extremely contextual and immediate, right Because you know with the kind of system we have I am able to talk to a customer about something Which the customer is probably involved in right now. For example, you know, a player is playing a hand on our system right and We know, you know, the distribution of different kind of players and people and and maybe this player is a new one And and he plays a hand, which is very very often, right now We as an organization Consider it as our responsibility To make sure that every player has a certain kind of experience on our platform So then it becomes our prerogative to also prompt this customer and this this player and tell them, you know This is where you could have played differently and this is where probably you could have had a different experience or outcome from this game right, so data becomes very important when we are talking of immediate contextual communication or a response to a consumer it becomes very very key Having said that there are higher order things which come out only from qualitative insights that you pick up from consumers when you talk to them Right. So marrying both these things together is where magic happens and data standalone Some great points there. Thank you, Joy. Thanks for that You know mother coming to you. I think with lens card, you know, there is definitely like an omni channel play Right when we talk about data in your context, there's a lot of offline data and online data That is available to lens card to play with right so from that that context How are you leveraging it at lens card? So thank you for the question so See you have you have spoken about the word omni when it's omni. There's no difference of using offline data too specific to offline or online to a specific online uh, I will Very much aligned to what yeshwinder sir have said that you have a lot of data coming out from all the channels You've been working From a sales standpoint and from the marketing standpoint If you don't know what to do about it, it's gonna be wastage and We as a market here. We just don't talk about the analytical part of collecting data I think we all will agree to the In the boardrooms the problem we have to face is the limitation of budgets we have And how do we gonna use it? So data that we have like everywhere we have data like, you know, basically social media is providing You a lot of engagement data In that also, there are a lot of breakups Your marketplaces are providing a different sort of channels in lens card. We have another service called hto We go to the customer home and get a lot of information and collect that and it's a it's a free I check up so you can call and we collect the data now what I supposed to do with it We have to understand what is the cohorts we are targeting how much and what is the right time to do that And how much roars, which is the final ultimatum of it? I'm getting out of it. Maybe I have a I have a very aligned and very planned strategy on social But the money I'm gonna invest in that same money can be invested in performance and I'll get better ROIs So the communication player a very important role. So I'm a fan of communication and content because I get data very easily I'm being leading into the market with let's say amazon pie provides me everything and anything I can ask for But then how to utilize it in the same universe of amazon because it's very different. You first pay them about Having been listed on the commission basis Then you have to fight with the competitive brands to get overbid and I'm I'm sure many of us have been facing this So using the right techniques to understand evaluate that data And right and you know target them with the right messaging at right time So that you don't burn a lot And churn out the data to and the cycle of data as well the top middle bottom funnel data size, you know that What is the uh, you know, uh, is it like overlapping that understanding also needs to be done So we in lens card has a team of about 30 body people in just analytic and uh, our You know management is very much into tech and data-driven strategies So we keep getting reports every day. What's happening in what center? Our job is to create a correlation that where the brand is getting most benefited and that's how we create our start Amazing mother. Thank you so much for that You know at the end of the day a consumer business is all about human connection, right? It's all about because we are we're people selling to people at the end of the day, right? So I just wanted to understand from each one of you How do we strike a right balance between human intuition like ishwinda? You just rightly mentioned and the data insights that we have right? What is it? What is the sweet spot to actually have these two? You know, sort of be channelized together. Maybe, uh, you know, mother I can start with you on this so What is exactly the context of what what you're looking at in this question? So for example, like in in this case, right when we talk about human insights I'm sure like there's a lot of data that you get where people have gone through your carousel And they've like added a few to their cart, right? But at the end of the day, how do you know? What is the good behavior to sort of reach out to them on that? So see we are into the fashion business We have a mandate to come out with something new because we as a human get bored of something very easily We have to keep creating that for more that you're missing out on something Uh in Lenscard, uh, we have a A master collection coming out every month and then there are certain small collections come out every week So you can imagine in a year how many new ranges of eyewear itself is coming out so that we can be trendy at same time And I think in the the room we were sitting someone's talking about the different layers of Gen Z and you know different set of audience coming they all have a different taste I mean, I'm just going to talk about from our side how we think and what strategies are pretty much working Is that it's as simple as that my intent is that you have multiple pairs of shoes shirts And a lot of other things why just have one eyewear So as a marketing Team person in Lenscard, we think that it has to come out as a strong fashion led brand Um, you should be aware about the education That what goes well with what and that's how we aim that you should have different pairs for your different needs because that's how the lenses works And we create certain things around it Uh, so that's one thing Obviously another element to it is The balance which I have asked for Churning out the data making those cohorts but creating a right messaging which I have again said Is something where human can the do best job because they personalize it. India is a beautiful place to have a lot of You know festivals around there's a lot of events keep happening around people get inspired and Had a lot of aspiration to to see something and have something So how quickly We collect that data when there's something new to has come up There's one data data element which works around your existing audience But there are some time when you're creating something there's no market for it But you're confident that this is a need which we have just one data We had which is searches we saw people are looking for it And if we can be on the top of it and bring it to that in that case, there's no data to defend you There's no data to benchmark the only thing you can go with is your your intuition your creativity You have to tell your consumer that hey, you're here and you're using this But this is not the right approach. You have to use this So Joy deep over to you, you know a similar question. How do you strike a right balance between A human intuition and the data points that you collect. Yeah So I would like to share an anecdote From my previous organization to really illustrate this and make it way clear About, you know, how to strike this balance And and the anecdote I would share is from et al in et al. I was leading a business called international roaming business Now data was telling us and like I said, we get data very very real time, right? So we can act and then really do a lot of marketing based on that Now data was telling us that every month There are about 3.5 lakh people from India Who travel to uk but never really buy any kind of international roaming packs, right? And for the longest time we kept sending them a lot of communications around, you know, this is how our packs are very great This is why you should buy our packs, right? And the conjecture was that, you know, people are usually habituated to, you know, sticking to their purchasing behavior And maybe at some point in the past they have, you know, water international roaming pack with somebody else And they're just sticking to that habit and maybe that's why they're not buying We couldn't solve this for a very long time. We kept communicating on discounts. We kept communicating very quickly We kept communicating about more data for you. Why don't you take this?  Why would you keep waiting for wi-fi wherever you go, right? Why don't you carry all your data with you so that you're independent because you used to get this insight That a lot of people actually look for wi-fi when they travel Then, you know, we also keep having a lot of rounds of consumer immersion where we talk to consumers So I remember this consumer immersion where I was supposed to talk to this consumer And I asked him, you know, you're traveling to UK pretty much every month In a year and you never buy our packs. So why is it? You know, where are you, you know, getting all your needs fulfilled here in terms of travel needs So he was like, excuse me, I don't travel to UK every month So I was like, but we see that you are in UK every month. So he was like, yes I am in UK every month, but I don't travel every month because I've been staying in UK for the last 12 months Now the reason why we thought this consumer travels to UK every month is because this consumer switches on his own Months every month. He connects to UK network and we see oh this guy is in UK now We don't know that this guy was always in UK. He was just putting his phone on to check OTPs Right Now, so this is where data can mislead you Right, the reality is something else And when we spoke to many such consumers, we realized the real requirement they had was not That of a lot of data heavy pack for travelers The real need was a pack which can really help give them a lot of you know, cheap calling to India So that they can keep in touch with family back at home It was not really so much about traveling exploring You know the whole context change Right, so this is how human interaction and intuition layer gets added on top of data and it becomes very powerful Because we created like, you know A 200 odd crore worth of business Just out of this insight In in a year's time Right, so this is this is an example which I thought I should share Ishwinder over to you, you know, do you have any real time experiences to share like Joydeep has in your industry? Again, I'll go back to my Exactly what Joydeep started I guess a very interesting project which we had started at a certain point of time and we said And this tells you how So you have different bosses you have different styles of working and There was a point in time when one of our bosses was very clear. Let's focus hardcore on data Absolutely fine, let's do it and we got into the development and a creation of a brand And every time we would get a consumer to search you and say, you know what? I get what the consumer is saying, but are we really pushing the envelope enough? And as we finish the process And we created the brand we created we drew it and this is concept And we realized if you put this next to The market leader It was absolutely the same So the consumer was very very comfortable with the brand which was the market leader And by telling you oh, I want it like this. I wanted like this. He was in fact replay His experiences his design love and his alignments of the market leader Now that's the danger of just following data Now you should understand what is important for the consumer And then get up and say how do I really push the envelope and over deliver? So again another conversation we have within the marketing field is If people wanted a better phone then Nokia should have never gone out of You know Where it is it was the largest brand solid phones. You could throw a Nokia on somebody said and you know Things would be very different, but the point is steel, you know made phones very good phones great keypad And every time you went for consumer research the people said oh fantastic. I wanted better. I wanted smoother I wanted But true disruption happens When you just don't look at data you understand. What is the unstated consumer need? And on top of that give them a breakthrough disruptive product So Not just one. I've given two examples. I think that is absolutely Interesting and inspired insightful Isha, you know you end up working with a lot of brands And I'm sure you know this kind of comes to your foray all the time Right. So what would you say when it but what would you like tell your brands? You know when it comes to like sort of having a balance between human intuition and the data that they would like to collect Yeah, I think I would have the consumer research A reference that has been given from the Swedish language And it actually means not too much not too more not too much not too less It's like just adequate And I think the balance that we're talking about specifically with data comes from when you don't go for more Specifically when you go for the right sources So it's not just the number of channels where you're collecting the data from It's how you are connected. Why you're collecting it? Like if you don't want to go on the digital bandwagon of online and it's don't collect online data do offline If purpose is not even close to the mission statement for the brand don't try and fit in Purpose in it. So it's a lot to do with doing more with less and When we are working with a lot of When it comes to a building communication, which is more purpose-led We have detailed conversations with how the internals stakeholders align on that purpose Because often we are looking for answers where we really get confused with the outputs from multiple sources of data Which generally doesn't lead to anything The second piece that I would advise is that for a lot of brands today looking at communities rather than bigger target groups is very important Which is for example If I talk about if I take joining your example Looking at a much larger demographic versus a small community of gamers The latter is obviously better because you'll get more insights On trends as compared to a very big piece or a universe of samples said that you're going to go a big quantitative survey in ads A very good example and of course there are a lot of bad examples to state as well Where purpose has gone wrong or personalization has really stretched too far, but a good one is I'm sure the visual designers or graphic designers and a lot a lot of people who love marketing have heard of phantom The color grading system which has been running forever And and it makes for a very good instagram content these days One would imagine how do how do they bring in purpose now? It's just a color grading system. So they have something called as color of the year That color of the year is related to generally either sustainability or something very relevant in the ecosystem Now one would feel that this is a thought very fast stretch, but it works So often it's also about the third eye of the consumer like Ishwinder stated One is the data which is on the surface second is what you really get out of it How can you be creative with it and often that's the answer lies in common sense in just the gut But data of course you need to support it validate it But starting right and starting less is something that I would say is what we recommend To a lot of our time partners Thank you. Uh, you know the pinder in your case, you know consumers are essentially patients, right? So today when you talk about human intuition, I think that aspect you really need to bring about when it comes to Consumers who are patients, right? So what would you say how do you strike a balance between human intuition and the data insights that you receive? See the problem in our case is that when it's a patient Your data will not tell you what is the person going through at that time You know, it's super critical to talk to patients all the time So we have an internal policy that you know the marketing team has to keep talking to patients keep listening to What the patients are talking about Because your data will always tell you that you know This is working. This is not but the reason behind something working as something not working Cannot be disclosed by data, right? You have to go And have that human interaction We have believed it to be a part of our roots that you know when we Uh, the first page that we built we didn't say that let's just build a page. We said, okay There are these many patients. We have come in contact with let's ask them What were they looking for? Why did they reach out to us? And what would make them take a next step in the journey? So that's what we always do and And just to give you another example. We did something with facebook right now. We We ran certain ads which take people from facebook to whatsapp Now our data was telling that you know all these people were not interesting In filling up the long form that we were having filled up in an interactive way That there were around seven questions and people were stopping at fourth question and We said something is wrong It cannot be that no one is interested and they're just coming answering four questions and not answering There's three questions. So you said let's just try calling these guys up So data was telling that these guys are not interested. So we called them up and Turned out that people said that I gave him my name. I gave him a phone number I told you what disease I'm suffering from. I told you which city I'm from. What else do you want? There were three extra questions which you just put in And if we just went with the data, we thought these guys are not interested And certainly these guys were the ones who were most interested in reaching out. They said we've given you the information Just reach out to us. So your intuition and that human touch element is super critical and data is just a validation that you know that What you thought and what you have talked about and what you were trying to create is that right or not You know, I just had a question. You're when you're solving for scale, right? At that point, it's not necessary all the interactions that you have with your consumers Could be on a human level, right? So then in that case, how do you solve for that scale problem? See, even when you are at this scale, it is just that one person Even at scale it will work. The reason is that you know, you're not talking about each and every problems are similar You have to solve for a bigger Chunk of the population and it automatically works So, uh, let's for example take a problem of cat, right? Why does the person get a surgery done? Right? Why would someone reach out? So we did a We did in-depth interviews with the patients and what we found out was It is not that Is that suddenly this I did that, you know, I want to get a surgery done.  You know, and I'm sure you've seen this in your experience with working with different brands across You know different industries. So what would you say are the best practices in this game? I think this of course is a working progress and I think it involves a lot of individual responsibility across stakeholders From at least from a data provider Then I would say that it is absolutely important to check source of data They're going to see source like check where is the pattern is from? Where is the respondent from? Are they fake respondents? Also authenticity and just the privacy is like very important here We've had situations where these things really go for a toss, but when you really go deeper into understanding sources I think that's where it's go to the best Yeah, you know Joydeep any thoughts on this, you know using data in a very Ethical and transparent manner. How do you ensure and what are the best practices to do that? See as long as Data with being used in a form where you're not using any personally identifiable information plus You are using data to make the consumers experience richer Right, because see the consumer is out there looking for a service looking for Something that you can fulfill right If you are able to use data to Identify when is the right time and what is it that they're looking for and you are able to provide it to them? It's a service you're doing to the consumers I think the boundary lies where You know You start over communicating Basis things which are not coming out from a consumer initiated activity, right? So for example, I know some set of consumers are You know, so for example when you try to Push a product very hard and you're using because because you know How you can reach them, right? And you over push you basically, you know Weaken the linkage that the consumers have with you as a brand, right? So it's it's actually an onus on the marketing team on the on the organization of how you Communicate to consumers. How frequently do you communicate to them? When do you communicate and how contextually are you reaching out to them? So this if done, right really helps in building A trusted relationship between the organization and the consumers and and really helps brand scale from there. So that's very crucial Um, Madhu, any thoughts From you on this. So I had two thoughts when you have mentioned the right time and the right message. So I think one The detail out which I've felt that can be good for this is uh Take your data tell you Where is that customer stand in your brand journey as of now? And with the right time give him a right messaging with the right intent where you want the consumer to go now next And understand whether he has taken a lot of time And your algorithms tell you that either you have figured out by the by the knowledge of data and statistics The statistic that he's not very much interested in this Messaging or the product you're showing him or the campaign you're showing him Either you go and give him something new something fresh or stop and wait for a certain duration Where he definitely starts searching for you again and then the next messaging come out Don't overlap and spend your money by again going to the first level of awareness because he's already aware So evaluate and understand the data on the depth and keep this Army of your data ready for you whenever you have something big coming when you really think this is the right audience We have recently done that we have a lot of youngsters coming and Searching for a lot of fast fashion product and we were aware that we're going to come up with a very latest range Which called hip-hop It's a it's a it's a range which talks about again your young young audience It's a it's an era of sneakers long t-shirts and everything and we thought it's a right time to come with it We got a right pace for it and then we use that data that these are the people who have always come But we eventually showed them something which is not really fun for for them very ordinary transparent frames or glasses So when hip-hop came to the picture we use that data which is dominant data for us and it converted well And we saw that the youngsters are being going to stores trying different layers They're buying three or four in one go And more strategies are coming on that way itself Okay, thank you. Uh, you know, we've spoken a lot about personalization and segmentation co-hortation, right? Uh, so of course personalization is very very important. In fact, I would say it is the need of the hour I mean, it's something that you would have done yesterday Uh, but how do you create an experience that hyper personalizes this experience for your consumer? You know, I just like some two lines from each one of you that we just agreed to know Oh, maybe mother if I can start with you personalization is Is as important as the first day of your of your business starts actually because you know You do all your entire consumer study I'm sure everyone does it that What what product I'm making is what is my target audience and there are two different audience that I'm saying There's a buying audience and there's a target audience So for that element Creating that personalization and keep improvising it with the with your with your journey with your knowledge Keep getting more categories to your brand is something which I feel is a very important task Don't just get stuck to something When you you talk about scaling also Scaling is only being possible if you keep creating different categories under your business itself. So There are there are 40 kind of different shapes in in eyewear itself What we know is I'm assuming the most famous is our wafer and aviators Why don't we and there is no community and there is no Information has been created at that level that you can you just see couple of celebs wearing it You might can get inspired about it and you want that shape But you don't know the logic about it. You don't know the The aviator has a story that it was created for air force pilots Because when they fly they basically have the pressure of air coming. So that's why the aviator shape come out There's a story behind everything like that. So that's how the and you when you start getting to know that Yes, this is a life. I'm living and that personalization brand has done which is a right for it for me Right for it makes right audience makes it goes well What about you joy deep any thoughts on this? Uh, I just quickly summarized by saying that, you know, the primary objective of of marketing, right Is to influence consumers behavior is to change consumer behavior, right from something That's there today to something that the organization would want To do this the starting point is to catch consumers attention And today all of us are inundated by so many communications from all the sides, right? We're just being bombarded. You you can't go through You know two to three minutes of time without being bombarded with something you look at your phones It would be full of messages, uh, which are about this, right Hence even to get to a point where you can capture somebody's attention Even for how so small duration it is You have to start with personalization if it's not personalized You stand no chance to capture any attention whatsoever. Forget about changing behaviors Right. So that's that's how critical it is and I think there's no way, you know, uh, without it Absolutely. Uh, Esha just wanted to, uh, you know, get some thoughts from you on this as well So I would say that for hyper personalization or any kind of segmentation because God's again has been like a buzzword Since the kiosk of we've costed personalization and hyper and now micro communities and so on and on But three things that never change in segmentation that everyone can sort of keep in check is time place and money Matrix which is how long these segments or hyper personalized cohorts are going to sustain Because they fast change today if there was a segmentation exercise done for a lot of categories earlier Which lasted those segments lasted for a few years now. It's changing quarterly We get requests for tracking segments, right? That's time second is where are you getting these segments from and last Is what is the value of these segments which are giving to you if you have these three in check? I think then hyper personalization is sorted Um, Ishwinder if you can give us your thoughts on this Yeah, I just want to say from a marketer's perspective to look a little differently. Okay, and uh Especially when you're handling a portfolio brand you have to look at at what stage is your brand at?  You've got to break and create your unique space If you you cannot be brand number 70 Doing the same thing and expecting to win. You can't You have to disrupt the category and get up and say I am the first person who looks at the category this way and you will succeed so Data can be cut in whatever form you want. It really depends upon what your ambition is But the point is either you unite yourself Or you micro segment the market That's what that's how you're going to look at data Um dependent completely agreed with what just ishwin this has said like being the latter Where I have to micro segment my target audience to an extent where I have to give them an experience Which is different from a hospital when a person walks into a hospital. He's a patient for them when a person walks Into pristine care. We eat the website. We eat on one of my caller numbers It is hyper personalization starts at that very second. We have micro segmented you to an extent We know what you are what you're looking from where you're from And we have to give you that experience for you to choose us over the Other hospitals. Otherwise, there's so many hospitals out there that you would choose The only reason I can pull you towards me is because of the service that I'm going to provide I go to personalize your journey I'm going to look after what you're looking for And that is super critical for a new age player like us that you know You have to change it to an extent that you know, you have to make eyes turn that you know This guy cares about getting me. He not just that I'm a patient who's coming So that's where the whole journey Changes Thank you I think we've had some really insightful points from the panel here today I'd like to actually open up the room, you know, if anybody has questions for our panelists here today It would be lovely to hear from the audience The gentleman in the back, please Sorry, we'll just pass on the mic to you if you can just give us a second Hello, Richard. How do you connect with the consumer because you're very far distant from the consumer It's your dealer distributor Yes, so Look the point remains that if we've got to understand who are can you hear me clearly? Yeah. Yeah, all right So I guess this is about Collecting data from our consumers. Okay So we do have very strong and very frequent interactions with our consumer base Through consumer researchers and through our in market interactions with them So as we said, there's a magic in Of human connections And therefore when we go and we meet our consumers, we do understand about their needs and what are they really looking for So that's how we really do it No, no, no, we've got physical interactions. We've got consumer researchers. There's a complete toolkit which exists within the system Any more questions from the audiences Okay, if there are no further questions, I'd just like to wrap up this session. Thank you so much everybody I think it's been I know it's been after lunch, but I think we've taken some valuable nuggets from this today And thank you so much again. Thank you


So that dude's rolling. She's over there on the left. Hold up. Can y'all see that?  I mean, this is illegal man. Oh, he's coming to get me with Lawrence. Look out.   Oh, yeah push him. We got blockers over here though I know we got blockers


So the next talk I'm really looking forward to this and I know Why the most most of you are here? because I'm excited about this too I own a Gameboy and I'm really proud of it and I have it In my flat and on special occasions. I take it out Well nowadays I use an emulator for sure and I only have roms of cartridges. I really own Well, that is that that is how it's supposed to work, right? Yeah, and I'm looking forward to this so by the way I'm my favorite games on a Gameboy the first one to make that clear our Mega Man 2 Vario Land and Mystic Quest and And who does not agree with this? Well, you don't know me that good then so we Go to the talk of the ultimate Gameboy talk. I'm really looking forward to this Yeah, we have as a speaker Michael style and he held a really great talk at 25 c3 the ultimate Commodore 64 talk and now with the ultimate Gameboy talk I'm really looking forward to this Michael style by day. He works on operating system technology by night He hacks obsolete systems in a previous life. He hacked game consoles Please a big round of applause Michael the stage is yours Hello, hello everyone Again, my name is Michael style and this is the ultimate Gameboy talk The idea of the talk is to talk as much as possible about all the different hardware details everything that I can fit into 60 minutes everything about the Gameboy 60 minutes I have about 200 slides over 800 Individual builds so maybe the information density is a little higher than normal So let's get started real quick The Gameboy talk is in the context of a series of talks that I have started eight years ago with the ultimate Commodore 64 talk and other people have picked that up and talked about the Atari 2600 the Galaxia and the Amiga 500 And so it's my turn now Again, and I picked the Gameboy. Why is the Gameboy so interesting? Because they sold lots and lots of systems Gameboy Gameboy color 118 million alone And if you count the Gameboy advanced models that are compatible Excluding the Gameboy Micro in total. It's almost 200 million systems. They have made 1600 about 1600 official games and They produced it from 1989 just the 8-bit models until 2003 and again If you count the compatible Gameboy advanced models, they made 8-bit compatible gaming systems until 2009. So that's a 20 year run, which is pretty amazing Let's look at the competition back then just after the Gameboy the Atari released the links Sega the game gear and any see the Turbo Express all of these had one thing in common They had a color screen pretty good color screen But they also had one thing in common which was really bad battery life of maybe three to five hours While a Gameboy had 15 to 30 hours But the compromise was it had a screen that looked like this and you could hardly make out anything really as soon as it starts scrolling This is not the case with all the models of the Gameboy of which there are many The original Gameboy in the original design which was produced for the longest time is the DMG DMG stands for dot matrix game, which was the original codename then in 96 They released a game by pocket which had a much better screen much smaller The MG be a Gameboy light was only released in Japan It had a backlight and then the Gameboy color with twice the CPU spades Speaks and twice the RAM and twice the video RAM and color support Then the Gameboy advanced series there were completely different architecture They were based on an arm CPU, but still what they were on 100% backwards compatible with Gameboy and Gameboy color games The advanced SP of that one two models exist if you want to get one You really need to get the AGS one or one, which is the one with a backlight instead of the front light and As you can see Nintendo has always been ahead of its time a little they didn't only make a rose gold version But also you need an adapter to plug in regular headphones if you want to play Gameboy games on a regular TV set the two options for that either you use an M Super Nintendo and plug in a super Gameboy the two versions of that one only released in Japan Which had the proper timing didn't run three percent too fast as the original one and the Gameboy player For the Nintendo Gamecube and all of these had complete Gameboy hardware embedded inside basically a normal Gameboy and it just It puts its pixel into the host system instead of on the screen So what is a Gameboy like as a 2.6 inch screen joypad mono speaker? You can get stereo over the headphones and there's a link connector serial port to connect two gameboys together contrast and volume and on the back This is where the game goes and this is where you put in your batteries And this is what a game looks like and basically most games are really just rom chips. There's nothing more to it Specifications what are the specifications of the game when let's compare the Gameboy to some other systems that may or may not be comparable The CPU is a 1 megahertz 8 bit CPU Some people in the audience may complain at this point and say no it's a 4 megahertz CPU But I'll explain later while I call it a 1 megahertz CPU There's eight cul-bats of RAM which is plenty for a gaming system of that type VRAM of 8 kilobytes is a little tight The resolution of a hundred and sixty five hundred and forty four is really poor, but at a screen this size You don't really notice that much It can do four simultaneous colors, which is four scale four shades of gray and it supports up to ten sprites per line So if you compare all this to these other systems here, it's clear that the gameboy is Way more advanced stuff for example and Hari 2600, but it's not at all in the league of unsuper Nintendo It's more like an SNE and more like a standard Nintendo entertainment system or a Commodore 64 But the fun thing here is that while the NES and the C64 were released in the early 80s The gameboy is from 89 and as I said compatible hardware was Was supported and released until 2009. So that's what makes it really interesting It's an 8-bit system, but it's really the latest the last 8-bit system that was in common use Let's look inside On the right the board on the right isn't very interesting if you look at it from the front This is where the LCD is connected speaker and the buttons the button the Board on the back is much more interesting. This is where you can see three chips So this is the DMG the original gameboy board two RAM chips to identical RAM chips One is for CPU RAM one is for video RAM and this one big chip here It's called the DMG CPU, but it really is the SOC the system on a chip. So what you would Regularly expect to be lots of chips in a computer system like that. Everything is integrated into just a single chip Which is the gameboy chip Let's compare some other boards here the super gameboy. It has a very similar chip. It's actually really 99.9% identical The gameboy pocket is in Is a slightly optimized model that comes only with one RAM chip for both the gameboy light you might have seen It's not actually any different. It's just another mgb from the mgb series, but it comes with a backlight Then there's the super gameboy 2 which is based on the gameboy pocket and This is what the gameboy color looks like on the inside. They all have this one gigantic chip that does everything But what is this one? This is a special one. You may not recognize it from the markings This thing is called the GB boy There have been companies cloning the gameboy all the time and what this particular model is is it's a perfect clone from decapping and photographing and redoing the mask of the original So see here and It's a Chinese Gameboy that you can still buy today for like 30 40 bucks or so on eBay It's a shame that the quartz is 30% too fast. So none of the games are playable Let's go back to The board so the DMG CPU is the thing that we're really interested in that does everything on the system What is included in the DMG CPU while a regular CPU core interrupt controller time and memory bootrom What you would expect from something like that and then all the peripheral devices like the IO joypad input serial data transfer for the link cable a sound controller and a video controller the pixel processing unit So let's talk about the CPU historically the gameboy from 1989 was released between the NES and the Super NES and The NES came with a 6502 Super NES came with a 65 816, which is the 16-bit version of that same CPU So obviously the gameboy comes with a sharp LR35902 What is the sharp LR35902 core? It's nothing like a 6502 It's more like somewhere in between an Intel 8080 and a Xilox Z80, but it's neither Both these architectures are interesting because the 8080 Was for example used in the Altair, which is the first computer that Bill Gates wrote software for and released it for and Z80 is in pretty much every computer a 8-bit home computer system that did not contain a 6502 very successful architecture So if you imagine this is the feature set of the Intel 8080 That's the feature set of the Xilox Z80. So it's a strict super set. It's perfectly backwards compatible And that is the gameboy CPU There the core architecture is the same as the one from the 8080 So all the core features are the register set to the instruction encoding Everything all that is the same But there are some features that are not supported But it does support some Z80 features, but it does not support most of the Z80 features And then they added a few features on top Let's walk through that So let's talk about the core architecture of the 8080 first. It has these registers There's the accumulator which is special. It's the one that can do all the arithmetic and logic You cannot do these with the other registers a flags register It only has two useful flags the zero and the carry flag in the gameboy model The other two are only used for decimal adjust and then there's BCD EHL another another set of 8-bit registers but the fun thing about those is that you can combine B and C into BC and DE and HL same thing So you actually have 16 better registers that you can use as pointers for example so in total there are 4 16 bit registers that can do some things and 7 8-bit registers plus one special case here Which is the memory location pointed to or the value at the memory location pointed to by the HL register Which can be used in place of any register in any In any instruction, which is pretty nice So these are the instructions. There's the load and stores by practically the same instruction You can indirect immediate direct stack is 16-bit can only push 16-bit registers These are arithmetic and logic ones as I said only the accumulator can do most of those except for incrementing and decrementing Which works in any register and that one also works on 16-bit registers there rotate instructions control flow jump call and return Conditional and indirect and then some miscellaneous functions setting the carry clearing the carry not halt and Disabling and in enabling the interrupt What is the interrupt model on most systems on that time? You would expect there's an interrupt vector for all the interrupts, but there's it's neither a vector nor is it just one Instead of jumping over a vector it jumps to fixed locations in RAM at the beginning of RAM And for the different kinds of interrupts it jumps at different locations. So hex 40 hex 48 and so on and There's also concept of software interrupts You can jump to these locations with special instructions and RST zero is a special one because this is the same as a reset when you turn on An 8080 CPU it starts at location zero Let's talk about the few unsupported 8080 features So these are the flags of the Game Boy. These are the actual flags of the 8080 and it has two for two extra flags One is the sign flag, which is kind of useful and the parody flag, which is not so nine none of these instructions are supported And a few others for some reason they just decided not to include those and port IO You may remember that from 80 from the 8086 it has the port space That one is in the 8080, but it's not supported on the Game Boy because it uses memory mapped IO instead the Z80 has lots of extra rotate and bit shift and bit testing setting and Resetting instructions all of those are supported as are as is the relative jump instruction Which is a more optimized version of a jump and the return from interrupt. That's all that is supported Everything that is not supported is all the interesting stuff from the Z80 Which is the second register set the extra two registers and lots and lots of features Including the auto increment and decrement and loop instructions, which are nice for copying memory But it has a few features of its own that take their place for example There's a post increment and decrement decrement So if you want to access memory that is pointed to by HL you can post increment or you can pre decrement HL There's also the concept of a zero page and it's a little confusing because not actually page zero in RAM It's the topmost page in RAM And if you know the 65 or 2 you can see this is a concept borrowed from the 65 or 2 It just means that there's an optimized instruction encoding for instructions that are in the for memory accesses That are in the topmost page of RAM. So instead of doing this Loading from ff40 which takes three bytes and four cycles you can encode it like this takes two bytes and three cycles And obviously you have to put something useful up there in the topmost page, which is timing critical They added a few stack instructions another store sp instruction you can swap the low and the high nibble they added eight instructions there and There's an extra power saving Instruction, so this is what the opcode table looks like just to get an idea from the color coding That you can see this is quite orthogonal and there are a few instructions that are or a few opcodes that are not in use and they all crash which is a nice design and This one is special the opcode CB It's a prefix which hosts another 256 opcodes This is the complete opcodes space for the rotate and shift instructions borrowed from the Z80 plus the additional Swap instruction that was added on the Gamebo CPU Let's look at another instruction here just as an example This is a low it loads from an fixed address This means it takes three bytes 16 clocks 16 clocks at four megahertz But the internet disagrees whether it should be looked at at four megahertz or at one megahertz because all the clock Times are divisible by four And this is because and the whole system is memory bound the whole CPU is memory bound So it can only calculate as fast as memory is Providing the data So basically you could just as well say this is a CPU that is clocked at one megahertz And it takes four clocks with for this and these are much say no numbers now because now the numbers are actually Comparable with similar systems like 65 or two base systems That also have one megahertz memory with them one megahertz CPU so in theory Yes, the CPU is clocked with four megahertz the RAM runs at one megahertz the PPU Draws its pixels the pixel processing unit at four megahertz and it's connected to VRAM that is running at two megahertz So it's a little complicated here in the system but most of the time everything runs or most of the numbers can be expressed in terms of one megahertz but To be exact it's not exactly one megahertz It's one maybe Hertz as in ten twenty four times twenty four Hertz So they didn't base it on factor ten on base ten they based it on base two just pretty And so from now on if I speak about cycles, I mean machine cycles at one megahertz So that's the CPU and it's a 16-bit CPU an 8-bit CPU that has a 16-bit address space because of the 16-bit pointers So 64 kilobytes of address spaces all it can see 32 kilobytes of that is the ROM space that comes from the cartridge It's just mapped in from the cartridge and there's a boot ROM laying lying on top of that that we'll talk about later Video RAM is mapped in external RAM that can also come from the cartridge optionally Then there's the internal RAM and some empty space which is unassigned or is mirroring just other things And if we zoom into this we can see at the top There is another page of OAM RAM which is a special purpose video RAM that is distinct from the video RAM that we'll talk about later And then the last page which is the zero page contains the IO area So all the registers for the peripherals like sound and video plus another 127 bytes of each RAM which is Distinct from the other RAM. So does this mean that games can only have 32 kilobytes? While some games only need 32 kilobytes Tetris fits nicely into 32 kilobytes. There's a single chip there Pretty simple to manufacture Other games can have in practice. I mean there's no theoretical limit, but in practice games go up to I think two megabytes This one is 128 kilobytes the way it achieves that is by adding another memory bank controller special chip to the cartridge Which can switch banks and this is common on all kinds of system So in practice while these memory bank controllers can be very different But most of them work something like this the lowest bank in memory always maps to bank zero of the ROM and the upper 16k map to whatever they can map to Bank 1 Bank 2 and so on and All this is controlled by Writing magic values into ROM locations, which then will go to the cartridge be intercepted by the memory bank controller Which then can switch those banks the same is true with the external RAM if the cartridge wants to Expose extra RAM for example for safe games that are done battery-backed. That's the only way to do safe games It can map in external RAM here same model So what's up with this boot ROM? The CPU starts running at location zero in memory and the boot ROM is the thing that draws this and does the chime this boot ROM is built into the Game Boy and Took a while until this was extracted was a real pain Not done by me And what it does is this is the complete boot ROM it initializes RAM initializes sound Sets up and decodes the logo that it puts on the screen that in scrolls in the logo It plays the chime and then it gets interesting It compares the logo because the game has to have a copy of that Nintendo logo inside If that if it doesn't match the game does not boot this was meant so that Nintendo could control which games are released for the platform because all games had to contain the logo Which is not just a copyright violation, but also trademark violation if if you include that and you don't have a Nintendo's permission After that it also checks sums the header just to make sure that all you don't have to blow into the pins and Then it turns off the ROM and continues execution in there. So the Nintendo then that logo though is actually Presented from the cartridge. So if you boot up a Game Boy without a cartridge, you will see this So but it doesn't mean that an application or a game can put any logo in there Because it does get compared and at that point it wouldn't boot any further And since that there was no cleanup code it doesn't reset the system or anything or clear the screen So some games did something like this they played with what's on the screen Let's just continue with that and of course demo is also like to play with that the Nintendo logo is on the screen Let's just do something with it Which is pretty nice So the boot ROM runs it runs until the last instruction and the last instruction is the one that turns off the boot ROM Even the first page in ROM is mapped to show game data and it continues running here So it just continues running into the next instructions from the game And usually there's a jump there because there's a header that has that is specified to be there at this location That header contains contains the Nintendo logo and the header checks some which are important All the other metadata is not really important It was important for the developers back then for their hardware But the gamer does not actually check any of this and after that you can have the actual game data So one other thing that we haven't looked at is the IO area and H-RAM, which is the topmost page in The in the system. It's the zero page. It's the one that you can access quite efficiently So the top 127 here are extra RAM and all the rest you can sprinkle throughout here You can see the different devices and these are all the registers total in the system interrupt controller sound controller joypad serial Timer and pixel processing unit and these are all the components that we'll talk about now Joypad input. It's really really simple. This is these are all the inputs the game boy has it's four buttons and four directions So you would think let's have eight GPIOs and with that we can do this But we can actually do it with six GPIOs because it's two columns with four rows So you select the column that you want to test and then from the row you can read what the what button was pressed So they could do with six instead of eight. That's all about the buttons pretty simple Serial data transfer you can connect two game boys together with a link cable everything the link cable consisted of was One wire of data in the one direction one wire for data in the other direction and a third wire for the clock The two game boys had to decide which one is sending the clock and which one is receiving the clock So these are the bits that control this One sets the clock and it's always eight kilohertz the receiving clock can really be anything It can be go up to half a megahertz and it will receive it and as soon as the transfer started It will clock the bytes through and it always goes both directions at the same time The timer is any system. It has a timer. There's only one timer The TMA register the modular register is where you put in the start value and then you can select one or four different speeds and then you start it and then it counts up until it overflows and at the Overflow time it reloads the module Number and can optionally generate an interrupt Speaking of interrupts the interrupt controller supports five different interrupts V-blank and LCD stats deal with the pixel processing unit. We'll talk about those later We've already seen the timer causing interrupt serial can cause an interrupt when a new byte has been received and joypad When a button has been pressed and this was the interrupt enable register and there's the interlop flag register Where you can see which interrupt is still pending and these are the addresses where those different interrupts jump So there's you don't have to find out which interrupt is was because the CPU jumps to different locations So the sound controller sound controller nothing has as many registers as the sound controller Because there's four voices and they all have their distinct registers, so this is a better way to look at them four voices and five registers each and Those registers have particular meanings But the meanings are rough because the four voices are not exactly the same there are two very similar ones that do a pulse and One that does that is called voice and one that is called noise If you look at the bits here, they are similar, but they're not the same So it depends on the voice what exactly those bits in those registers mean Let's Look at the ones that are in common and all the voices have a trigger bit which turns on the voice and You could just turn it off again at some point But there's a length bit and a length register, so you can just say it turned off off after a quarter second Let's look at the wave register, which is the simplest one in addition So the idea of the wave register is that you can play any sound wave it has these extra 16 bytes of register here, which is 32 entries of four bits each and These can describe any waveform that you like that fits into these 20 into these 32 Slots, so here are some examples and you could for example create a sawtooth Which is a pretty simple waveform where you could have a sign or you could just do anything custom So you're pretty flexible at that and then there's the frequency which controls the pitch just controls how fast that wave table is played and Two extra bits of volume so you can play it a hundred percent fifty percent twenty five percent or you can mute it The other two here the two pulse registers the two pulse voices. They're very similar All these bits are the same and behave the same You cannot specify a waveform here the waveform is kind of fixed. It's always a pulse meaning low and high in in different ratios and These two bits determine the ratio between low and high 12.5 high and the rest is low 25 percent 50 and then 75 should sound exactly like 25. It's just inverted So you can do this with either of these registers and there's also the concept of a volume sweep So the volume can go up or the volume can go down volume going down It's the common case for emulating standard instruments or the volume going up is an interesting effect and Only the first pulse voice also has the concept of a frequency sweep So you can go up Or you can go down So you can see this is mostly meant for sound effects and these are some more examples of sound effects That's what you can do with that And there's a fourth voice that can only do noise. So this is a shift register that basically generates pseudoramnum numbers and Depending on whether you set it to 15 bit mode or seven bit mode. It will do one It will do one of two different waveforms That's 15 bit mode and that's seven bit mode So these are all the registers again different voices and three general purpose registers this register has a volume for left volume for right channel and interestingly cartridges can have their own audio controller that outputs an analog signal that can be hooked up into this but no game ever did this and There is Another register where you can say should a voice be on the left or the right on the right on both or on neither And then there's the power bit if you turn off the power to audio you will save like 13% or so of energy So the game boys not only used or game by sound is not only used for games People still compose music in tools like a little sound DJ today on the game boy and I'll show you a short example of that So much for sound Let's talk about the pixel processing unit the pixel processing unit is the thing that makes graphics It has 12 registers, which is not quite a lot But let's look at the specifications first. We talked about it before a hundred and sixty five hundred and forty pixels Not that much four shades of gray, which is more like four bad shades of green Later game boys are much better Everything on the screen is eight by eight tile based and there are a certain number of tiles on the screen That's bright and all this has to deal with eight kilobytes of video RAM What do I mean when I say eight by eight pixel tiles if we look at a game like Tetris? You can see everything's blocky everything's based on these blocks Same with Zelda if we put the grid over it You can see they're repeating patterns and they're all aligned to a certain grid with Super Mario land It's also pretty obvious here, especially because it doesn't have many different of these tiles Even with something like Donkey Kong land You can see it as soon as you put the grid over it and that there are some repetitions and everything's aligned to that even though they did a very good job at hiding that and In some games you can see it because it plays with that very concept So here in Turrican you can see it fills the screen with tiles Let's look at a tile and what a tile is like Tile consists of eight times eight pixels and has four colors like everything in the system and These colors are encoded zero zero zero one one zero one one So let's add that to these pixels and let's look at how the encoding is done If I look at the first line here, and I read it as a binary number zero two and ff So for every line of pixels I need two bytes And in total I need 16 bytes to describe a whole tile You may have noticed here that the the ordering of the colors here doesn't necessarily make sense This is because I can choose my own palette. It can be any palette There's a two-bit to two-bit mapping in the system for these background tiles So the native colors are one zero zero means white and one one means black So I can pick any palette like this. I can also reuse the same colors if I want that for some effect There are 256 tiles in the system. So this tileset do you recognize what it is? It's Tetris if you don't recognize those dancing people at the bottom, then you have not finished Tetris This is Zelda and That is a Super Mario Land which only uses 128 tiles. Just can't deal with that Anyone recognize what this is? Let's just puzzle together something and we'll see it's a tennis game It's all star tennis This is puzzled together from 20 tiles by 18 tiles which fill up the whole screen Which is not the whole truth because actually in video RAM there are 32 tiles by 32 tiles This is the complete background map and what you see in the screen is just a viewport into that and It's 256 by 256 pixels, which is nice and convenient Because this is how scrolling works by just moving that viewport around and We can see this in practice There's a really nice emulator that lets you see what's going on in the background map and how the viewport is changing around So this is basically really a camera that is moving around a bigger 32 by 32 map But this only works with games that are maximum 32 by 32 What about games that are scrolling infinitely like Super Mario Land? We can have this many extra columns and we can move the viewport over here But what what happens if we end up here at the end? Well, it will wrap around and if we just to draw columns fast enough just before the viewport hits them We can have an infinite world So in the emulator you can see this quite clearly in the off-screen area of the viewport It keeps putting in those new columns. This also works in two dimensions. This is Donkey Kong land again This looks pretty freaky. It just puts those extra columns and lines Where it will go So this is the one layer that we've talked about so far It's the background and on top of the background is another layer that you can optionally put on top It's the window it can cover it fully or it can start at any location There's an X and a Y position for that and it will draw from there to the right and to the bottom There's no translucency ever. So usually how this is used is you put it to the very right Or you put it it to the very bottom. It just overlays this and does not respond to the other scrolling Settings and you guess that this is necessary for something like a score that is shown at the bottom of the screen This is very nice easy and convenient for games But you can also put it on the right and these are game of color games, but it wouldn't matter It works on the game by just as well And then there's another layer on top of the background and the window which is a sprites Sprites are objects on the screen that are that don't fit into the eight by eight rasters. You can position them freely So we have three sprites here in the system and Nintendo calls them objects OBJ But I'll keep calling them sprites because everyone calls them sprites. Let's just look at this goomba here Every sprite in the system has attributes and there's the OAM Which is the object attribute map and this is one OAM entry and it has these values So one of them is the X position So if we put the goomba to the very left of the screen you would expect us to have a horizontal position of zero Right, but no, it's eight. Why is that? Because if you put it at four it's here and if you put it at zero it's here because it's eight pixels wide You need a way to scroll it in and something similar is true at the top of the screen, but the first white position where you see it fully is 16 because Sprites can also be can can be up to 16 bits 16 16 pixels in height So let's put it at its natural location here the next thing To look at is what should it look like so first of all you can see it's a eight by eight grid It's the same encoding except that it also has translucent pixels So the code zero zero stands for translucency And since it's the same encoding is the same kind of tiles and there's also 256 tiles in the system Which is a byte and we can see it here. It's tile hex 90 The next thing is the flip expert so in so you don't have to save two goombas here one That walks to the left and one walks to the right you just flip it horizontally and you have one that works to the right You flip it vertically and you have a dead goomba you flip it horizontally and vertically and you have a dead goomba walking the other direction So let's put it right side it up again The next bit is the palette because one pixel combination one bit combination means Translucency you only have three more colors for sprites, which is a shame So they didn't want to impose three specific colors for this So for any for the sprites you can pick which three colors out of the four you want and all the sprites don't have to share the same three colors Because there are two palettes in the system Which is why the sprite also has another flag does it take palette zero palette one if it takes palette one It would like this would look like this with palette zero. It looks like this And one more bit is priority. So how does the sprite draw in comparison with the background? If the priority is one this is the interesting case it will draw on top of all those white pixels here But it will draw at the back of all the non-white pixels, but there's nothing special about white here This is why there exists a background palette. It's about pixels that have the value of zero in the background So if you pick another palette and the goomba could very well be drawn on top of any other color If we set the priority to zero it will draw on top of everything except for the translucent pixels, of course Sprite and sprite priority. There's nothing you can do about this. This is always fixed We have this rectangle here and the goomba is on top of the rectangle Which is because the goomba's horizontal position is smaller than the rectangles as soon as they're at the same horizontal position The sprite with a lower number wins because the sprites are an array in memory The one that comes earlier draws over the one that comes later as soon as the white ranked angle It has a smaller X position than the goomba It will draw on top of it and you can see this as flickering effects in some games when you walk through other things There are 40 sprites in the system You can have 40 sprites on the screen at the same time, but there's another limitation per line You can only have 10 sprites So I have an 11th sprite here and it only counts per pixel line So here these pixels would not be drawn or the next line or the next line And this is not about the 11th one from the left It's the 11th visible one in the list of sprites in the ordering that the program decides So this is the complete OAM entry. It fits neatly into four bytes So this is one OAM entry in memory FE-00 is where on these entries are stored There are 40 of them for the 40 sprites and the whole thing is called the OAM RAM Which is a special purpose RAM at this location in memory, which is not part of video RAM One more thing I should say about sprites is even the small Mario This is the small one is too big for 8 by 8 sprites So you could do it as four sprites and this is what the game actually does But there's another mode where you can have sprites that are 16 pixels high But this is global, the whole game would have to deal with the 16 pixel high sprites then So we've seen the three different layers There is one more thing you can actually completely turn off the display Which is a fifth color, which is a little lighter than white Not very useful because you have to turn off the complete LCD So as soon as you turn on the LCD, but don't draw a background, you get white If you draw the background and say you want to draw it in light gray It completely replaces that color You can draw a window on top, again, no translucency here And you can draw sprites on top And notice that sprites don't distinguish between whether a pixel is background or window So there's no clipping going on with the window So how does all this work with the memory map? Four kilobytes of sprites tiles And four kilobytes of background tiles And one kilobyte of the background map The 32 by 32 And we also have a kilobyte of the window map It's not the most efficient representation that they did it for Because it was easier And we only have eight kilobytes of video RAM So if we put the sprites tiles here, the background tiles here We have already run out of video RAM Let's try it differently Let's put the sprites here Let's put the background and the window map here And what do we do with the background tiles? Let's have them overlap And there are different configurations here Three bits We can have them completely overlap or just partially And we can swap around these or have them at the same location What does this overlap mean? So this is one configuration The background tiles and the sprites tiles They're in the same format 8 by 8 Two bits per pixel So they could share exactly the same tiles But you can also put them this way So the first third, the first 128 Would be sprites tiles exclusively The last 128 would be background tiles exclusively And the ones in the middle would be shared by both Or usable by both And in the case of Super Mario Land here You can see that the first two thirds Are used for sprites And the last third is used for the background The next step is vertical timing As in CRT-based systems So this is how a normal old CRT system draws its picture Very in a very slow motion version It draws it from the top to the bottom From the left to the right And the same is true on a Game Boy It keeps drawing the picture 60 times a second From top to bottom, line by line, left to right This was not done because they were reusing some old components They completely redid the very idea how this was done But still, an LCD wants to be refreshed 60 times a second And they draw it like that And this is important to know If you wanted to do certain effects That you cannot otherwise do In this game, for example, you can see That different parts of the screen behave differently And let's just look at the scrolling city line here It would be easy to just have that scroll By itself on the full screen But we only want to scroll a part of the screen And the way this is done is with these extra registers So if you've seen 8-bit programming On something like a C64 before You've seen all this there You can see, you can read Which line is currently being drawn Or which will be drawn in just a moment And instead of just busy waiting there You can also set an interrupt It will wake you up as soon as a certain line is reached So let's set the scroll X register to zero And let's trigger here at line 8 So it will draw all this with a scroll offset of zero At this point, our program will set the scroll offset The horizontal scroll offset to, let's say, 23 In the next frame, we'll set it to 24 So we'll scroll And we'll set the compare register to 42 And it will continue drawing here with a certain offset And then we set it to something else Set another lyc It keeps drawing like that How exactly it draws the road here We'll talk about that later That's a fun trick as well And then we set it to zero again Because the dashboard doesn't do any kind of scrolling And we do the same thing on the next screen again In this example So it doesn't only have to do with the X scrolling register Here's a different example Where the Mario on the top right is actually a window And we talked about this before The window will draw from a certain position to the right And to the bottom of the screen You cannot just have it draw halfway But yes, you can You trigger at line zero and turn on the window And they trigger again at line 40 and turn off the window So when it draws line 40 The PPU will think, window? What window? Don't know about any window So it won't draw any further And you can see this in all kinds of games Some of these tricks can be done with a window Other have to be done with screen splitting techniques If you don't just trigger on certain lines But do something fun on every line You can do a trick like this So on the left you can see what's on the screen On the right you can see what's actually happening Or what's stored inside the video RAM If you change SCX in every line This is the curve that is just used as a transform For that picture and that curve changes on every frame And all the program has to do is on every single line It has to write a different SCX value into the SCX register And of course it has to be done in every line This picture here doesn't show it in every line And the racing game effect is pretty much the same thing here This is what you can see in the video RAM It's just a straight road But it gets distorted at runtime while the picture is being drawn So let's zoom into this This is the source and this is what we can see on the screen So if you ignore the sprites here This is the curve that it has to use to distort it And these are all the offsets of SCX So if you keep updating SCX in every single line You can warp it like that And another thing you can see here is That the line in the middle is patterned As well as the part outside of the road And this is done by changing the palette every few lines In a certain way And you can even go one step further This rally game here can also do bumps in the road Which is done by picking not just the horizontal scroll register But also the vertical scroll register in every line So you can duplicate lines and you can skip lines And with some good math you'll get to that And if you update your vertical scroll register In the middle of a line you can do this wobble effect Which is two dimensional But for that we have to go a little deeper And go into horizontal timing What happens while a line is being drawn? So this is the pixel transfer mode of the PPU It usually takes 43 clocks And this is done for 144 lines But you cannot just imagine that At the end of the first line It will immediately draw the first pixel of the next line That's not what's happening Because there's an extra OAM search At the beginning of each line which is 20 clocks I'll talk about that in a minute And an H blank area of 51 clocks At the end of every line In H blank mode the PPU is idling It doesn't do anything And there's also a V blank mode When the PPU doesn't do anything between screens So let's do the math A line is 114 clocks at 1 MHz 54 lines So this is this many clocks per screen If you divide the base clock by this You'll get a refresh rate of 59.7 Hz These four different modes that the PPU can be in You can read that out And the CPU can know about that And you can also trigger interrupts based on this But why would the CPU have to know? Let's look at what's going on in these different modes First, what is this OAM search of 20 cycles At the beginning of each line? For every line the PPU has to decide Which sprites are visible in that line So there are 40 sprites total in the system And it has to filter those sprites It has to find the sprites that are visible in that line And put them into an array of up to 10 sprites That are visible there And the logic for that is The exposition cannot be zero Because then it would be invisible And the current line that we're drawing Must be between the first line of the sprite And the last line of the sprite So it gets added to the visible sprite array And this takes 20 cycles By the way, in the original game Where there was a fun bug here If you do any calculations Any 16-bit calculations with numbers Between FE00 and FEFF Which is the pointer to the OAM RAM Even if you're not accessing RAM at all It will destroy the RAM during OAM mode So why else would you have to care about what's going on? The CPU is connected to RAM PPU is connected to video RAM And OAM RAM is special PPU is also connected directly to OAM RAM CPU could be connected to the video RAM as well So it can write to video RAM But this is not how it's done You would need a double speed video RAM here C64 does it like that But on the Game Boy It has to go through the PPU And there's this one big switch where the PPU can say You cannot access it right now If the CPU wants to write Nothing happens If it reads, it gets all FEFF At least nothing bad can happen But it's also not very useful So the CPU has to make sure that the PPU is in the right mode So that it can access all this During pixel transfer You cannot access video RAM But you can But during OAM search H blank and V blank Video RAM access is OK If you want to access OAM RAM You cannot do it in either OAM search Or during pixel transfer Because that's when the sprites are drawn The PPU needs that You can only access it in those times So you have to be very careful In those times while the screen is being drawn So basically all this is bad area for the CPU It shouldn't do anything important at that time So for example if you want to move in new columns Into the background map You should do this in V blank Where you have the most uninterrupted time And all the game logic All the game AI can be done While the screen is being drawn But there's a caveat here You cannot write the new sprite positions At this point because OAM is going on So what games usually do Is they write the new updated sprite information Into a shadow OAM Which is just a copy of the OAM And then during V blank they copy that Into the real OAM So they copy a block from here From any of those sources Into the OAM as a location This is not to scale It doesn't have to do that by itself Because there's a DMA function You just write the block that you want to be copied Into this location Takes 160 clocks And while it's doing that The CPU keeps running But it cannot access any of the source Of the source address space So it has to wait But since that code has to come from somewhere as well The only place you can put it is into H-RAM Which is a nice use of that as well So pixel pipeline Let's dig in as deep as it gets Into the pixel pipeline And this is cutting-edge research And some of these things have been Previously not known to the public The pixel FIFO is the central concept Of how the Game Boy draws its picture So let's jump somewhere in the middle We have some pixels on the LCD already So there's five pixels Already shifted out Sent to the LCD And the pixel FIFO, let's say There are a few pixels in there Now in every step In every four megahertz step It shifts out one pixel And sends it to the LCD It shifts out a pixel Sends it to the LCD Shifts out the next one Sends it to the LCD You may have noticed here That a green button just became red Because the pixel FIFO has to contain More than eight pixels To be able to shift something out Why that is, we'll get to that Now we should get new data And fill the FIFO And that's what the FETCHER is for The FETCHER fetches background tiles And 9802 is right now The position of the map That it fetches it from So it reads the tile number From the background map Takes one cycle In the next cycle It reads the first part of the data And the second part of the data From the tile RAM Because every line of a tile Is 16 bits And from that it can construct Eight new pixels It starts over again Goes to the next location And it can put those eight pixels Into the upper half of the FIFO And then it can just continue Pushing those pixels out But what is not happening is that It keeps pushing pixels And when it's done It has to fetch some again Of course this is all Interleaved and running at the same time So let's walk through this real quick The FIFO is running at twice the speed So it does two pushes Until the fetch can do one step So push, push And we read the first byte of data Push, push And the second part of the data And at that point It cannot put the data into the FIFO yet Because the FIFO isn't empty yet So fetch switches to red Has to wait for two more cycles here And then so it's idle for a while And then it puts the data in So if you look at the memory access patterns You can see three reads and an idle Three reads and an idle So again, the FIFO pushes one pixel per clock At four megahertz pauses Unless it contains more than eight pixels And the fetch runs at two megahertz Three clocks to fetch those new eight pixels And it pauses in the fourth clock Unless there's space in the FIFO available Scrolling is done very simply Let's say we scroll by three pixels So everything's moved to the left by three pixels The first three pixels are just discarded And then the next pixel goes here on the LCD So at the end of the line this becomes interesting Because when we want to trigger on 160 The FIFO may contain the next few pixels That we won't actually draw And the fetch is already in the middle of fetching The next tile that we also don't care about So at this point it'll just stop all this And it has done too much work And will be in H blank mode Which is the reason why a line takes 43 clocks Instead of more logical 40 clocks If we have a window Let's say the window triggers at position 26 And we're here at 26 The FIFO has some data in it The fetch is somewhere in the middle It will completely clear the FIFO And then the FIFO will be stopped Because we don't want those pixels anymore That are already lined up And the fetch will switch over to the map of the window And the fetch will be restarted And then we'll do the tile fetch The data fetch, the data fetch And we'll get the data from the window We can put it into the pixel FIFO So as soon as those are shifting out Window pixels will be drawing With sprites, there are 10 comparators That are triggering on the X position And let's say here at position 26 We have a sprite at that location And again, the pixel FIFO has lots of pixels And fetch is somewhere in the middle First, we temporarily suspend the pixel FIFO It cannot push out any more pixels We switch temporarily the fetch To doing a sprite fetch And restarting the fetch So we're getting the sprite information And instead of putting it at the end We overlay it with the first eight pixels And we mix them onto the pixels And this explains why the FIFO Always has to have eight pixels in there Because that's how it mixes in the sprites This is in stark contrast to other systems So when we just push out pixels at a constant rate Until a window starts When the window starts, the FIFO gets cleared We are not pushing out pixels for quite a while Until the FIFO has the window data again And at which point it is resumed So it takes 43 clocks or more Depending on what's going on the screen With sprites, it can take even more This is on an LCD-based system You can do that You can suspend sending pixels On a CRT-based system, you cannot So for example, on a C64 A line always has to have exactly 40 clocks Because any pixel that comes a clock too late Will be shifted to the right, visually So it's not completely accurate That we have 40 clocks for pixel transfers More like 43 plus And the H-blank area is just the remaining line And in practice, this is more like what it looks like Depending on what sprites or background you have So I wasn't completely honest about How the pixel FIFO works It does not actually store pixel colors What it does store is the information The original information of the bit combinations And the source Like here it says, these are nine background pixels And the same is true with a fetch It does not create pixel colors It creates those bit combinations Plus the information which sprite palette it was Or what the source was So let's mix these together The sprite is priority zero Meaning drawing on top of the background And let's go through these There's sprite 100 Means this is the translucent So the background wins In this case, the sprite wins Because it draws on top of the background And this is true for most of those pixels And at the very last pixel We can see this is a sprite with palette one And it's translucent again So here the background wins again Let's do this one more time with another sprite That is at the exact same location In the first case here Sprite with a palette of zero Draws on top of the background, sprite wins And in this case, a new sprite Does not win over the old sprite There's already a sprite at this pixel So the old sprite wins And this is true for everything And this is how sprites that draw farther to the right Don't draw on top of existing sprites And sprites with higher numbers Don't draw on top of existing sprites And this is the last one where the sprite wins again And the applying of the palette Is only done at the very end When the pixel is shifted out So we look it up here in the palette We convert it to a color And we put it on LCD Look it up, convert it LCD Another one, black And this is how it's also done on the color system So starting with the Super Game Boy Existing games that couldn't really deal with this Could be colorized And what's done there, there's... The existing three palettes can now be RGB palettes Everything else in the system is the same But as soon as we shift this out It looks up RGB color It puts a pink pixel on the screen 11, S1, that's here Black pixel One more example, 01 from S1 Because that used to be a sprite with palette 01 Put it on the screen That's the end of the technical part We have five more minutes Let's talk about development In case you're now interested in doing Game Boy development There are some really nice tools The Rednecks Game Boy development system Is a set of command line tools That work really nice with make files And your editor of choice When you want to debug your code The BGP emulator, which is meant for Windows But works really nicely with wine On top of OS X or Linux as well It has a built-in debugger, single-stepping breakpoints And it has this really nice video RAM viewer That shows you all the details about what's going on Also really nice to run demos in that And see what's going on inside And if you want to run it on real hardware There are devices like the EverDrive Where you can put in an SD card And since we have another four minutes Let's talk about my favorite peripheral Of the Game Boy, the Game Boy camera But not from a technical perspective Just how great a device that is This is the Game Boy camera You put it at the back of the Game Boy Shoots really nice pictures You can print them on the Game Boy printer On thermo paper If you can still get that paper And you can take awesome pictures like that Let's zoom in a little These are really nice pictures Every picture is based on the CCD That has 14 kilopixels At a bit depth of two So next time you go on a trip Make sure, take a Game Boy Take a Game Boy Don't forget your Game Boy camera And a PC with a parallel port And that one link cable That you cannot get on eBay anymore So thanks to those people Who helped debug the Game Boy And helped me with a presentation And those people helped me in various other ways So in the series of the ultimate talks This was now the fifth talk What's next? There should be a talk next year, right? I'm suggesting two talks I'm nominating for 34C3 Dominic Wagner to talk about the Acorn Archimedes And I nominate Janis Harder For the Super Nintendo It's your choice You can do these talks Or you can put a bucket of ice water on top of your head Thank you for your attention And see you next year


Andrew Rube Foster held many positions within the hierarchy of baseball and excelled at all of them. His career began at the age of 17 at the barnstorming days of Negro League baseball. He began pitching for the Leland Giants in 1907 and three years later became their manager, leading them to a 123 and 6 record. In 1910, Foster co-founded the Chicago American Giants and served as their president, general manager, field manager, and occasionally their pitcher, leading them to 11 regional championship victories and three Negro League titles. He co-founded the Negro National League and served as League President and Secretary. Rube Foster became known as Black Baseball's greatest manager and the man most responsible for its continued existence. Andrew Rube Foster was voted into the Baseball Hall of Fame in 1981. Celebrating Black History, I'm Megan Trippler.